protected function assertContextualLinksClickable(): void
{ $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"]'
));
// We explicitly wait for the off-canvas area to be fully resized before
// trying to press the Close button, instead of waiting for the Close button
// itself to become visible. This is to prevent a regularly occurring random
// test failure.
$this->
waitForOffCanvasArea();
$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();
}