function OffCanvasTestBase::waitForOffCanvasToOpen
Same name in other branches
- 9 core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php \Drupal\Tests\system\FunctionalJavascript\OffCanvasTestBase::waitForOffCanvasToOpen()
- 10 core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php \Drupal\Tests\system\FunctionalJavascript\OffCanvasTestBase::waitForOffCanvasToOpen()
- 11.x 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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.