function LayoutBuilderContextMappingUpdatePathTest::testRunUpdates
Same name in other branches
- 9 core/modules/layout_builder/tests/src/Functional/Update/LayoutBuilderContextMappingUpdatePathTest.php \Drupal\Tests\layout_builder\Functional\Update\LayoutBuilderContextMappingUpdatePathTest::testRunUpdates()
Tests the upgrade path for enabling Layout Builder.
File
-
core/
modules/ layout_builder/ tests/ src/ Functional/ Update/ LayoutBuilderContextMappingUpdatePathTest.php, line 30
Class
- LayoutBuilderContextMappingUpdatePathTest
- Tests context-aware blocks after the context changes to section storage.
Namespace
Drupal\Tests\layout_builder\Functional\UpdateCode
public function testRunUpdates() {
$assert_session = $this->assertSession();
$this->runUpdates();
$this->drupalLogin($this->rootUser);
// Ensure that defaults and overrides display the body field within the
// content region of the one column layout.
$paths = [
// Overrides.
'node/1',
// Defaults.
'admin/structure/types/manage/article/display/default/layout',
];
foreach ($paths as $path) {
$this->drupalGet($path);
$assert_session->statusCodeEquals(200);
$assert_session->elementExists('css', '.layout--onecol .layout__region--content .field--name-body');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.