You are here

protected function TableDragTest::findWeightsToggle in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php \Drupal\FunctionalJavascriptTests\TableDrag\TableDragTest::findWeightsToggle()
  2. 9 core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php \Drupal\FunctionalJavascriptTests\TableDrag\TableDragTest::findWeightsToggle()

Finds the show/hide weight toggle element.

Parameters

string $expected_text: The expected text on the element.

Return value

\Behat\Mink\Element\NodeElement The toggle element.

1 call to TableDragTest::findWeightsToggle()
TableDragTest::testRowWeightSwitch in core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php
Tests row weight switch.

File

core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php, line 573

Class

TableDragTest
Tests draggable table.

Namespace

Drupal\FunctionalJavascriptTests\TableDrag

Code

protected function findWeightsToggle($expected_text) {
  $toggle = $this
    ->getSession()
    ->getPage()
    ->findButton($expected_text);
  $this
    ->assertNotEmpty($toggle);
  return $toggle;
}