function NavigationBlockUiTest::assertOffCanvasFormAfterWait
Same name in this branch
- main core/modules/navigation/tests/src/FunctionalJavascript/NavigationBlockUiTest.php \Drupal\Tests\navigation\FunctionalJavascript\NavigationBlockUiTest::assertOffCanvasFormAfterWait()
Same name and namespace in other branches
- 10 core/modules/navigation/tests/src/FunctionalJavascript/NavigationBlockUiTest.php \Drupal\Tests\navigation\FunctionalJavascript\NavigationBlockUiTest::assertOffCanvasFormAfterWait()
- 11.x core/modules/navigation/tests/src/FunctionalJavascript/NavigationBlockUiTest.php \Drupal\Tests\navigation\FunctionalJavascript\NavigationBlockUiTest::assertOffCanvasFormAfterWait()
- 11.x core/modules/shortcut/tests/src/FunctionalJavascript/NavigationBlockUiTest.php \Drupal\Tests\shortcut\FunctionalJavascript\NavigationBlockUiTest::assertOffCanvasFormAfterWait()
Waits for the specified form and returns it when available and visible.
Parameters
string $expected_form_id: The expected form ID.
File
-
core/
modules/ shortcut/ tests/ src/ FunctionalJavascript/ NavigationBlockUiTest.php, line 189
Class
- NavigationBlockUiTest
- Tests the shortcuts block in the navigation block UI.
Namespace
Drupal\Tests\shortcut\FunctionalJavascriptCode
private function assertOffCanvasFormAfterWait(string $expected_form_id) : void {
$this->assertSession()
->assertWaitOnAjaxRequest();
$this->waitForOffCanvasArea();
$off_canvas = $this->assertSession()
->elementExists('css', '#drupal-off-canvas');
$this->assertNotNull($off_canvas);
$form_id_element = $off_canvas->find('hidden_field_selector', [
'hidden_field',
'form_id',
]);
$this->assertNotEmpty($form_id_element);
$this->assertSame($expected_form_id, $form_id_element->getValue());
$this->assertTrue($form_id_element->getParent()
->isVisible());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.