function QuickEditJavascriptTestBase::awaitQuickEditForEntity
Same name in other branches
- 8.9.x 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.
7 calls to QuickEditJavascriptTestBase::awaitQuickEditForEntity()
- CKEditor5IntegrationTest::testArticleNode in core/
modules/ quickedit/ tests/ src/ FunctionalJavascript/ CKEditor5IntegrationTest.php - Tests if an article node can be in-place edited with Quick Edit.
- CKEditor5IntegrationTest::testDiscard in core/
modules/ quickedit/ tests/ src/ FunctionalJavascript/ CKEditor5IntegrationTest.php - Tests that changes can be discarded.
- LayoutBuilderIntegrationTest::testArticleNode in core/
modules/ quickedit/ tests/ src/ FunctionalJavascript/ LayoutBuilderIntegrationTest.php - Tests if an article node can be in-place edited with Quick Edit.
- LayoutBuilderIntegrationTest::testCustomBlock in core/
modules/ quickedit/ tests/ src/ FunctionalJavascript/ LayoutBuilderIntegrationTest.php - Tests if a custom can be in-place edited with Quick Edit.
- LayoutBuilderQuickEditTest::assertQuickEditInit in core/
modules/ quickedit/ tests/ src/ FunctionalJavascript/ LayoutBuilderQuickEditTest.php - Asserts that Quick Edit is initialized on the node view correctly.
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.