protected function ContentPreviewToggleTest::assertContextualLinks in Drupal 10
Same name and namespace in other branches
- 8 core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\ContentPreviewToggleTest::assertContextualLinks()
- 9 core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\ContentPreviewToggleTest::assertContextualLinks()
Checks if contextual links are working properly.
@internal
File
- core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ ContentPreviewToggleTest.php, line 128
Class
- ContentPreviewToggleTest
- Tests toggling of content preview.
Namespace
Drupal\Tests\layout_builder\FunctionalJavascriptCode
protected function assertContextualLinks() : void {
$page = $this
->getSession()
->getPage();
$assert_session = $this
->assertSession();
$this
->clickContextualLink('.block-field-blocknodebundle-for-this-particular-testbody', 'Configure');
$this
->assertNotEmpty($assert_session
->waitForElement('css', "#drupal-off-canvas"));
$this
->assertSession()
->assertWaitOnAjaxRequest();
$this
->assertNotEmpty($this
->assertSession()
->waitForButton('Close'));
$page
->pressButton('Close');
$assert_session
->assertNoElementAfterWait('css', '#drupal-off-canvas');
}