function WorkspacesLayoutBuilderIntegrationTest::setUp
Same name in other branches
- 10 core/modules/workspaces/tests/src/FunctionalJavascript/WorkspacesLayoutBuilderIntegrationTest.php \Drupal\Tests\workspaces\FunctionalJavascript\WorkspacesLayoutBuilderIntegrationTest::setUp()
Overrides InlineBlockTestBase::setUp
File
-
core/
modules/ workspaces/ tests/ src/ FunctionalJavascript/ WorkspacesLayoutBuilderIntegrationTest.php, line 41
Class
- WorkspacesLayoutBuilderIntegrationTest
- Tests for layout editing in workspaces.
Namespace
Drupal\Tests\workspaces\FunctionalJavascriptCode
protected function setUp() : void {
parent::setUp();
$this->drupalLogin($this->drupalCreateUser([
'access contextual links',
'configure any layout',
'administer node display',
'administer node fields',
'create and edit custom blocks',
'administer blocks',
'administer content types',
'administer workspaces',
'view any workspace',
'administer site configuration',
'administer nodes',
'bypass node access',
]));
$this->setupWorkspaceSwitcherBlock();
// Enable layout builder.
$this->drupalGet(static::FIELD_UI_PREFIX . '/display/default');
$this->submitForm([
'layout[enabled]' => TRUE,
'layout[allow_custom]' => TRUE,
], 'Save');
$this->clickLink('Manage layout');
$this->assertSession()
->addressEquals(static::FIELD_UI_PREFIX . '/display/default/layout');
// Add a basic block with the body field set.
$this->addInlineBlockToLayout('Block title', 'The DEFAULT block body');
$this->assertSaveLayout();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.