You are here

protected function OffCanvasTestBase::getOffCanvasDialog in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php \Drupal\Tests\system\FunctionalJavascript\OffCanvasTestBase::getOffCanvasDialog()
  2. 9 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

File

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

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;
}