protected function LayoutBuilderDisableInteractionsTest::assertContextualLinksClickable in Drupal 8
Same name and namespace in other branches
- 9 core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderDisableInteractionsTest::assertContextualLinksClickable()
- 10 core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderDisableInteractionsTest::assertContextualLinksClickable()
Confirms that Layout Builder contextual links remain active.
1 call to LayoutBuilderDisableInteractionsTest::assertContextualLinksClickable()
- LayoutBuilderDisableInteractionsTest::testFormsLinksDisabled in core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ LayoutBuilderDisableInteractionsTest.php - Tests that forms and links are disabled in the Layout Builder preview.
File
- core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ LayoutBuilderDisableInteractionsTest.php, line 205
Class
- LayoutBuilderDisableInteractionsTest
- Tests the Layout Builder disables interactions of rendered blocks.
Namespace
Drupal\Tests\layout_builder\FunctionalJavascriptCode
protected function assertContextualLinksClickable() {
$assert_session = $this
->assertSession();
$page = $this
->getSession()
->getPage();
$this
->drupalGet($this
->getUrl());
$this
->clickContextualLink('.block-field-blocknodebundle-with-section-fieldbody [data-contextual-id^="layout_builder_block"]', 'Configure');
$this
->assertNotEmpty($assert_session
->waitForElementVisible('css', '.ui-dialog-titlebar [title="Close"]'));
$page
->pressButton('Close');
$assert_session
->assertNoElementAfterWait('css', '#drupal-off-canvas');
// Run the steps a second time after closing dialog, which reverses the
// order that behaviors.layoutBuilderDisableInteractiveElements and
// contextual link initialization occurs.
$this
->clickContextualLink('.block-field-blocknodebundle-with-section-fieldbody [data-contextual-id^="layout_builder_block"]', 'Configure');
$this
->assertNotEmpty($assert_session
->waitForElementVisible('css', '#drupal-off-canvas'));
$page
->pressButton('Close');
$assert_session
->assertNoElementAfterWait('css', '#drupal-off-canvas');
$this
->assertContextualLinkRetainsMouseup();
}