protected function LayoutBuilderDisableInteractionsTest::assertLinksFormIframeNotInteractive in Drupal 10
Same name and namespace in other branches
- 8 core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderDisableInteractionsTest::assertLinksFormIframeNotInteractive()
- 9 core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderDisableInteractionsTest::assertLinksFormIframeNotInteractive()
Asserts that forms, links, and iframes in preview are non-interactive.
@internal
File
- core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ LayoutBuilderDisableInteractionsTest.php, line 200
Class
- LayoutBuilderDisableInteractionsTest
- Tests the Layout Builder disables interactions of rendered blocks.
Namespace
Drupal\Tests\layout_builder\FunctionalJavascriptCode
protected function assertLinksFormIframeNotInteractive() : void {
$assert_session = $this
->assertSession();
$page = $this
->getSession()
->getPage();
$this
->assertNotEmpty($assert_session
->waitForElement('css', '.block-search'));
$searchButton = $assert_session
->buttonExists('Search');
$this
->assertElementUnclickable($searchButton);
$assert_session
->linkExists('Take me away');
$this
->assertElementUnclickable($page
->findLink('Take me away'));
$iframe = $assert_session
->elementExists('css', '#iframe-that-should-be-disabled');
$this
->assertElementUnclickable($iframe);
}