function OffCanvasTestBase::getOffCanvasDialog

Same name in other branches
  1. 9 core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php \Drupal\Tests\system\FunctionalJavascript\OffCanvasTestBase::getOffCanvasDialog()
  2. 10 core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php \Drupal\Tests\system\FunctionalJavascript\OffCanvasTestBase::getOffCanvasDialog()
  3. 11.x core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php \Drupal\Tests\system\FunctionalJavascript\OffCanvasTestBase::getOffCanvasDialog()

Gets the off-canvas dialog element.

Return value

\Behat\Mink\Element\NodeElement|null

1 call to OffCanvasTestBase::getOffCanvasDialog()
OffCanvasTest::assertOffCanvasDialog in core/modules/system/tests/src/FunctionalJavascript/OffCanvasTest.php

File

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

Class

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

Namespace

Drupal\Tests\system\FunctionalJavascript

Code

protected function getOffCanvasDialog() {
    $off_canvas_dialog = $this->getSession()
        ->getPage()
        ->find('css', '.ui-dialog[aria-describedby="drupal-off-canvas"]');
    $this->assertEquals(FALSE, empty($off_canvas_dialog), 'The off-canvas dialog was found.');
    return $off_canvas_dialog;
}

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