protected function OffCanvasTestBase::waitForOffCanvasToOpen in Drupal 8
Same name and namespace in other branches
- 9 core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php \Drupal\Tests\system\FunctionalJavascript\OffCanvasTestBase::waitForOffCanvasToOpen()
Waits for off-canvas dialog to open.
Parameters
string $position: The position of the dialog.
Throws
\Behat\Mink\Exception\ElementNotFoundException
8 calls to OffCanvasTestBase::waitForOffCanvasToOpen()
- OffCanvasTest::assertOffCanvasDialog in core/
modules/ system/ tests/ src/ FunctionalJavascript/ OffCanvasTest.php - OffCanvasTest::testNarrowWidth in core/
modules/ system/ tests/ src/ FunctionalJavascript/ OffCanvasTest.php - Tests the body displacement behaves differently at a narrow width.
- OffCanvasTest::testOffCanvasLinks in core/
modules/ system/ tests/ src/ FunctionalJavascript/ OffCanvasTest.php - Tests that non-contextual links will work with the off-canvas dialog.
- QuickEditIntegrationTest::testQuickEditLinks in core/
modules/ settings_tray/ tests/ src/ FunctionalJavascript/ QuickEditIntegrationTest.php - Tests QuickEdit links behavior.
- SettingsTrayBlockFormTest::testEditModeEnableDisable in core/
modules/ settings_tray/ tests/ src/ FunctionalJavascript/ SettingsTrayBlockFormTest.php - Tests enabling and disabling Edit Mode.
File
- core/
modules/ system/ tests/ src/ FunctionalJavascript/ OffCanvasTestBase.php, line 69
Class
- OffCanvasTestBase
- Base class contains common test functionality for the Off-canvas dialog.
Namespace
Drupal\Tests\system\FunctionalJavascriptCode
protected function waitForOffCanvasToOpen($position = 'side') {
$web_assert = $this
->assertSession();
// Wait just slightly longer than the off-canvas dialog CSS animation.
// @see core/misc/dialog/off-canvas.motion.css
$this
->getSession()
->wait(800);
$web_assert
->assertWaitOnAjaxRequest();
$this
->assertElementVisibleAfterWait('css', '#drupal-off-canvas');
// Check that the canvas is positioned on the side.
$web_assert
->elementExists('css', '.ui-dialog-position-' . $position);
}