foreach (['1', '2', '1'
] as $link_index) { $this->
assertOffCanvasDialog($link_index, 'side'
);
$header_text =
$this->
getOffCanvasDialog()->
find('css', '.ui-dialog-title'
)->
getText();
if ($link_index == '2'
) { // Check no title behavior.
$web_assert->
elementExists('css', '.ui-dialog-empty-title'
);
$this->
assertEquals(' ',
$header_text);
$style =
$page->
find('css', '.ui-dialog-off-canvas'
)->
getAttribute('style'
);
$this->
assertStringContainsString('width: 555px;',
$style, 'Dialog width respected.'
);
$page->
clickLink("Open side panel 1"
);
$this->
waitForOffCanvasToOpen();
$style =
$page->
find('css', '.ui-dialog-off-canvas'
)->
getAttribute('style'
);
$this->
assertStringNotContainsString('width: 555px;',
$style, 'Dialog width reset to default.'
);
} else { // Check that header is correct.
$this->
assertEquals("Thing
$link_index",
$header_text);
$web_assert->
elementNotExists('css', '.ui-dialog-empty-title'
);
} } // Test the off_canvas_top tray.