protected function TableDragTest::findRowById in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php \Drupal\FunctionalJavascriptTests\TableDrag\TableDragTest::findRowById()
Finds a row in the test table by the row ID.
Parameters
string $id: The ID of the row.
string $table_id: The ID of the parent table. Defaults to 'tabledrag-test-table'.
Return value
\Behat\Mink\Element\NodeElement The row element.
4 calls to TableDragTest::findRowById()
- TableDragTest::assertKeyboardAccessibility in core/
tests/ Drupal/ FunctionalJavascriptTests/ TableDrag/ TableDragTest.php - Asserts accessibility through keyboard of a test draggable table.
- TableDragTest::testNestedDraggableTables in core/
tests/ Drupal/ FunctionalJavascriptTests/ TableDrag/ TableDragTest.php - Tests nested draggable tables through keyboard.
- TableDragTest::testRootLeafDraggableRowsWithKeyboard in core/
tests/ Drupal/ FunctionalJavascriptTests/ TableDrag/ TableDragTest.php - Tests the root and leaf behaviors for rows.
- TableDragTest::testTableDragChangedWarning in core/
tests/ Drupal/ FunctionalJavascriptTests/ TableDrag/ TableDragTest.php - Tests the warning that appears upon making changes to a tabledrag table.
File
- core/
tests/ Drupal/ FunctionalJavascriptTests/ TableDrag/ TableDragTest.php, line 547
Class
- TableDragTest
- Tests draggable table.
Namespace
Drupal\FunctionalJavascriptTests\TableDragCode
protected function findRowById($id, $table_id = 'tabledrag-test-table') {
$xpath = "//table[@id='{$table_id}']/tbody/tr[.//input[@name='table[{$id}][id]']]";
$row = $this
->getSession()
->getPage()
->find('xpath', $xpath);
$this
->assertNotEmpty($row);
return $row;
}