function TableDragTest::findRowById
Same name in other branches
- 9 core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php \Drupal\FunctionalJavascriptTests\TableDrag\TableDragTest::findRowById()
- 8.9.x core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php \Drupal\FunctionalJavascriptTests\TableDrag\TableDragTest::findRowById()
- 11.x 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 559
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.