private function LayoutBuilderTest::enableLayoutsForBundle in Drupal 9
Same name and namespace in other branches
- 8 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 444
Class
- LayoutBuilderTest
- Tests the Layout Builder UI.
Namespace
Drupal\Tests\layout_builder\FunctionalJavascriptCode
private function enableLayoutsForBundle($path, $allow_custom = FALSE) {
$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');
}