function LayoutBuilderTest::enableLayoutsForBundle
Same name in other branches
- 9 core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderTest::enableLayoutsForBundle()
- 8.9.x core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderTest::enableLayoutsForBundle()
- 10 core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderTest::enableLayoutsForBundle()
Enable layouts.
Parameters
string $path: The path for the manage display page.
bool $allow_custom: Whether to allow custom layouts.
1 call to LayoutBuilderTest::enableLayoutsForBundle()
- LayoutBuilderTest::testLayoutBuilderUi in core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ LayoutBuilderTest.php - Tests the Layout Builder UI.
File
-
core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ LayoutBuilderTest.php, line 453
Class
- LayoutBuilderTest
- Tests the Layout Builder UI.
Namespace
Drupal\Tests\layout_builder\FunctionalJavascriptCode
private function enableLayoutsForBundle($path, $allow_custom = FALSE) : void {
$assert_session = $this->assertSession();
$page = $this->getSession()
->getPage();
$this->drupalGet($path);
$page->checkField('layout[enabled]');
if ($allow_custom) {
$this->assertNotEmpty($assert_session->waitForElementVisible('css', 'input[name="layout[allow_custom]"]'));
$page->checkField('layout[allow_custom]');
}
$page->pressButton('Save');
$this->assertNotEmpty($assert_session->waitForElementVisible('css', '#edit-manage-layout'));
$assert_session->linkExists('Manage layout');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.