function NavigationBlockUiTest::openAddBlockForm

Same name in this branch
  1. main core/modules/navigation/tests/src/FunctionalJavascript/NavigationBlockUiTest.php \Drupal\Tests\navigation\FunctionalJavascript\NavigationBlockUiTest::openAddBlockForm()
Same name and namespace in other branches
  1. 10 core/modules/navigation/tests/src/FunctionalJavascript/NavigationBlockUiTest.php \Drupal\Tests\navigation\FunctionalJavascript\NavigationBlockUiTest::openAddBlockForm()
  2. 11.x core/modules/navigation/tests/src/FunctionalJavascript/NavigationBlockUiTest.php \Drupal\Tests\navigation\FunctionalJavascript\NavigationBlockUiTest::openAddBlockForm()
  3. 11.x core/modules/shortcut/tests/src/FunctionalJavascript/NavigationBlockUiTest.php \Drupal\Tests\shortcut\FunctionalJavascript\NavigationBlockUiTest::openAddBlockForm()

Opens the add block form in the off-canvas dialog.

Parameters

string $block_title: The block title which will be the link text.

File

core/modules/shortcut/tests/src/FunctionalJavascript/NavigationBlockUiTest.php, line 174

Class

NavigationBlockUiTest
Tests the shortcuts block in the navigation block UI.

Namespace

Drupal\Tests\shortcut\FunctionalJavascript

Code

private function openAddBlockForm($block_title) : void {
  $this->assertSession()
    ->linkExists('Add block');
  $this->clickLink('Add block');
  $this->assertSession()
    ->assertWaitOnAjaxRequest();
  $this->assertNotEmpty($this->assertSession()
    ->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.