function InlineBlockTestBase::assertDialogClosedAndTextVisible
Same name in other branches
- 9 core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php \Drupal\Tests\layout_builder\FunctionalJavascript\InlineBlockTestBase::assertDialogClosedAndTextVisible()
- 8.9.x core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php \Drupal\Tests\layout_builder\FunctionalJavascript\InlineBlockTestBase::assertDialogClosedAndTextVisible()
- 11.x core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php \Drupal\Tests\layout_builder\FunctionalJavascript\InlineBlockTestBase::assertDialogClosedAndTextVisible()
Asserts that the dialog closes and the new text appears on the main canvas.
Parameters
string $text: The text.
string|null $css_locator: The css locator to use inside the main canvas if any.
4 calls to InlineBlockTestBase::assertDialogClosedAndTextVisible()
- InlineBlockPrivateFilesTest::addInlineFileBlockToLayout in core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ InlineBlockPrivateFilesTest.php - Adds an entity block with a file.
- InlineBlockPrivateFilesTest::replaceFileInBlock in core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ InlineBlockPrivateFilesTest.php - Replaces the file in the block with another one.
- InlineBlockTestBase::addInlineBlockToLayout in core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ InlineBlockTestBase.php - Adds an entity block to the layout.
- InlineBlockTestBase::configureInlineBlock in core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ InlineBlockTestBase.php - Configures an inline block in the Layout Builder.
File
-
core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ InlineBlockTestBase.php, line 194
Class
- InlineBlockTestBase
- Base class for testing inline blocks.
Namespace
Drupal\Tests\layout_builder\FunctionalJavascriptCode
protected function assertDialogClosedAndTextVisible($text, $css_locator = NULL) {
$assert_session = $this->assertSession();
$assert_session->assertNoElementAfterWait('css', '#drupal-off-canvas');
$assert_session->elementNotExists('css', '#drupal-off-canvas');
if ($css_locator) {
$this->assertNotEmpty($assert_session->waitForElementVisible('css', ".dialog-off-canvas-main-canvas {$css_locator}:contains('{$text}')"));
}
else {
$this->assertNotEmpty($assert_session->waitForElementVisible('css', ".dialog-off-canvas-main-canvas:contains('{$text}')"));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.