function LayoutBuilderTest::openAddBlockForm

Same name in other branches
  1. 8.9.x core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderTest::openAddBlockForm()
  2. 10 core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderTest::openAddBlockForm()
  3. 11.x 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 471

Class

LayoutBuilderTest
Tests the Layout Builder UI.

Namespace

Drupal\Tests\layout_builder\FunctionalJavascript

Code

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');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.