function QuickEditJavascriptTestBase::awaitQuickEditForEntity
Awaits Quick Edit to be initiated for all instances of the given entity.
Parameters
string $entity_type_id: The entity type ID.
int $entity_id: The entity ID.
File
-
core/
modules/ quickedit/ tests/ src/ FunctionalJavascript/ QuickEditJavascriptTestBase.php, line 127
Class
- QuickEditJavascriptTestBase
- Base class for testing the QuickEdit.
Namespace
Drupal\Tests\quickedit\FunctionalJavascriptCode
protected function awaitQuickEditForEntity($entity_type_id, $entity_id) {
$entity_selector = '[data-quickedit-entity-id="' . $entity_type_id . '/' . $entity_id . '"]';
$condition = "document.querySelectorAll('" . $entity_selector . "').length === document.querySelectorAll('" . $entity_selector . " .quickedit').length";
$this->assertJsCondition($condition, 10000);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.