function QuickEditJavascriptTestBase::awaitQuickEditForEntity
Same name in other branches
- 9 core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditJavascriptTestBase.php \Drupal\Tests\quickedit\FunctionalJavascript\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.
5 calls to QuickEditJavascriptTestBase::awaitQuickEditForEntity()
- LayoutBuilderQuickEditTest::assertQuickEditInit in core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ LayoutBuilderQuickEditTest.php - Asserts that Quick Edit is initialized on the node view correctly.
- QuickEditFileTest::testRemove in core/
modules/ quickedit/ tests/ src/ FunctionalJavascript/ QuickEditFileTest.php - Tests if a file can be in-place removed with Quick Edit.
- QuickEditImageTest::testImageInPlaceEditor in core/
modules/ image/ tests/ src/ FunctionalJavascript/ QuickEditImageTest.php - Tests that quick editor works correctly with images.
- QuickEditIntegrationTest::testArticleNode in core/
modules/ quickedit/ tests/ src/ FunctionalJavascript/ QuickEditIntegrationTest.php - Tests if an article node can be in-place edited with Quick Edit.
- QuickEditIntegrationTest::testCustomBlock in core/
modules/ quickedit/ tests/ src/ FunctionalJavascript/ QuickEditIntegrationTest.php - Tests if a custom can be in-place edited with Quick Edit.
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.