function MoveBlockFormTest::findRowHandle

Same name in other branches
  1. 9 core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\MoveBlockFormTest::findRowHandle()
  2. 8.9.x core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\MoveBlockFormTest::findRowHandle()
  3. 11.x core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\MoveBlockFormTest::findRowHandle()

Finds the row handle for a block in the draggable table.

Parameters

string $block_label: The block label.

Return value

\Behat\Mink\Element\NodeElement The row handle element.

1 call to MoveBlockFormTest::findRowHandle()
MoveBlockFormTest::moveBlockWithKeyboard in core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php
Moves a block in the draggable table.

File

core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php, line 239

Class

MoveBlockFormTest
Tests moving blocks via the form.

Namespace

Drupal\Tests\layout_builder\FunctionalJavascript

Code

protected function findRowHandle($block_label) {
    $assert_session = $this->assertSession();
    return $assert_session->elementExists('css', "[data-drupal-selector=\"edit-components\"] td:contains(\"{$block_label}\") a.tabledrag-handle");
}

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