diff --git a/tests/src/Functional/UwWcmsBasicTest.php b/tests/src/Functional/UwWcmsBasicTest.php index f8cb3fdd526723e1946440e9506e8488c7ef5179..043ab48c96f987f3b1a4ab6f51da20f9a9de558b 100644 --- a/tests/src/Functional/UwWcmsBasicTest.php +++ b/tests/src/Functional/UwWcmsBasicTest.php @@ -614,6 +614,24 @@ class UwWcmsBasicTest extends BrowserTestBase { } } } + // Test Layout Builder configuration paths for catalog item content type. + // catalog item content type only has one configure section and the above + // content types have three configure sections (1, 2, 3). + $nid = $content_nids['uw_ct_catalog_item']; + $this->drupalGet('node/' . $nid . '/layout'); + $paths = [ + 'layout_builder/choose/section/overrides/node.' . $nid . '/0' => TRUE, + 'layout_builder/choose/section/overrides/node.' . $nid . '/1' => FALSE, + 'layout_builder/configure/section/overrides/node.' . $nid . '/0' => FALSE, + ]; + foreach ($paths as $path => $access) { + if ($access || $user === 'administrator') { + $this->assertSession()->linkByHrefExists($path); + } + else { + $this->assertSession()->linkByHrefNotExists($path); + } + } } }