private function LayoutBuilderTest::openAddBlockForm in Drupal 9
Same name and namespace in other branches
- 8 core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderTest::openAddBlockForm()
- 10 core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderTest::openAddBlockForm()
Opens the add block form in the off-canvas dialog.
Parameters
string $block_title: The block title which will be the link text.
1 call to LayoutBuilderTest::openAddBlockForm()
- LayoutBuilderTest::testLayoutBuilderUi in core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ LayoutBuilderTest.php - Tests the Layout Builder UI.
File
- core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ LayoutBuilderTest.php, line 464
Class
- LayoutBuilderTest
- Tests the Layout Builder UI.
Namespace
Drupal\Tests\layout_builder\FunctionalJavascriptCode
private function openAddBlockForm($block_title) {
$assert_session = $this
->assertSession();
$assert_session
->linkExists('Add block');
$this
->clickLink('Add block');
$assert_session
->assertWaitOnAjaxRequest();
$this
->assertNotEmpty($assert_session
->waitForElementVisible('named', [
'link',
$block_title,
]));
$this
->clickLink($block_title);
$this
->assertOffCanvasFormAfterWait('layout_builder_add_block');
}