function OffCanvasTestBase::waitForOffCanvasToOpen

Same name and namespace in other branches
  1. 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

2 calls to OffCanvasTestBase::waitForOffCanvasToOpen()
SettingsTrayBlockFormTest::testEditModeEnableDisable in core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php
Tests enabling and disabling Edit Mode.
SettingsTrayTestBase::openBlockForm in core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php
Open block form by clicking the element found with a css selector.

File

core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php, line 81

Class

OffCanvasTestBase
Base class contains common test functionality for the Off-canvas dialog.

Namespace

Drupal\Tests\system\FunctionalJavascript

Code

protected function waitForOffCanvasToOpen($position = 'side') {
  $this->waitForOffCanvasArea();
  // Check that the canvas is positioned on the side.
  $this->assertSession()
    ->elementExists('css', '.ui-dialog-position-' . $position);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.