function InlineBlockTestBase::assertSaveLayout
Same name in other branches
- 9 core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php \Drupal\Tests\layout_builder\FunctionalJavascript\InlineBlockTestBase::assertSaveLayout()
- 8.9.x core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php \Drupal\Tests\layout_builder\FunctionalJavascript\InlineBlockTestBase::assertSaveLayout()
- 11.x core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php \Drupal\Tests\layout_builder\FunctionalJavascript\InlineBlockTestBase::assertSaveLayout()
Saves a layout and asserts the message is correct.
11 calls to InlineBlockTestBase::assertSaveLayout()
- InlineBlockPrivateFilesTest::testPrivateFiles in core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ InlineBlockPrivateFilesTest.php - Tests access to private files added to inline blocks in the layout builder.
- InlineBlockTest::testAccess in core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ InlineBlockTest.php - Tests access to the block edit form of inline blocks.
- InlineBlockTest::testDeletion in core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ InlineBlockTest.php - Tests that entity blocks deleted correctly.
- InlineBlockTest::testInlineBlockParentRevert in core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ InlineBlockTest.php - Test editing inline blocks when the parent has been reverted.
- InlineBlockTest::testInlineBlocks in core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ InlineBlockTest.php - Tests adding and editing of inline blocks.
File
-
core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ InlineBlockTestBase.php, line 81
Class
- InlineBlockTestBase
- Base class for testing inline blocks.
Namespace
Drupal\Tests\layout_builder\FunctionalJavascriptCode
protected function assertSaveLayout() {
$assert_session = $this->assertSession();
$page = $this->getSession()
->getPage();
// Reload the page to prevent random failures.
$this->drupalGet($this->getUrl());
$page->pressButton('Save layout');
$this->assertNotEmpty($assert_session->waitForElement('css', '.messages--status'));
if (stristr($this->getUrl(), 'admin/structure') === FALSE) {
$assert_session->pageTextContains('The layout override has been saved.');
}
else {
$assert_session->pageTextContains('The layout has been saved.');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.