function TableDragTest::waitUntilDraggingCompleted
Same name in other branches
- 9 core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php \Drupal\FunctionalJavascriptTests\TableDrag\TableDragTest::waitUntilDraggingCompleted()
- 8.9.x core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php \Drupal\FunctionalJavascriptTests\TableDrag\TableDragTest::waitUntilDraggingCompleted()
- 10 core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php \Drupal\FunctionalJavascriptTests\TableDrag\TableDragTest::waitUntilDraggingCompleted()
Waits until the dragging operations are finished on a row handle.
Parameters
\Behat\Mink\Element\NodeElement $handle: The draggable row handle element.
Throws
\Exception Thrown when the dragging operations are not completed on time.
1 call to TableDragTest::waitUntilDraggingCompleted()
- TableDragTest::moveRowWithKeyboard in core/
tests/ Drupal/ FunctionalJavascriptTests/ TableDrag/ TableDragTest.php - Moves a row through the keyboard.
File
-
core/
tests/ Drupal/ FunctionalJavascriptTests/ TableDrag/ TableDragTest.php, line 656
Class
- TableDragTest
- Tests draggable table.
Namespace
Drupal\FunctionalJavascriptTests\TableDragCode
protected function waitUntilDraggingCompleted(NodeElement $handle) : void {
$class_removed = $this->getSession()
->getPage()
->waitFor(1, function () use ($handle) {
return !$handle->hasClass($this::DRAGGING_CSS_CLASS);
});
if (!$class_removed) {
throw new \Exception(sprintf('Dragging operations did not complete on time on handle %s', $handle->getXpath()));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.