diff --git a/tests/src/Behat/OeThemeTestContext.php b/tests/src/Behat/OeThemeTestContext.php index c2286b74f7..ddaa59b41d 100644 --- a/tests/src/Behat/OeThemeTestContext.php +++ b/tests/src/Behat/OeThemeTestContext.php @@ -436,7 +436,13 @@ public function iShouldSeeTheSiteHeader(string $ecl_branding): void { $this->assertSession()->elementExists('css', 'a.ecl-site-header__logo-link .ecl-site-header__logo-image'); $this->assertSession()->elementExists('css', '.ecl-site-header__top .ecl-site-header__action .ecl-site-header__language-selector'); $this->assertSession()->elementExists('css', '.ecl-site-header__top .ecl-site-header__action .ecl-site-header__search-container'); - $this->assertSession()->elementExists('css', '.ecl-site-header__banner'); + $menu = $this->getSession()->getPage()->find('css', 'header.ecl-site-header .ecl-menu.ecl-menu--group1'); + if ($ecl_branding === 'Core' && !$menu) { + $this->assertSession()->elementNotExists('css', '.ecl-site-header__banner'); + } + else { + $this->assertSession()->elementExists('css', '.ecl-site-header__banner'); + } } /** diff --git a/tests/src/Functional/ConfigurationTest.php b/tests/src/Functional/ConfigurationTest.php index 240abba207..e338c864c4 100755 --- a/tests/src/Functional/ConfigurationTest.php +++ b/tests/src/Functional/ConfigurationTest.php @@ -187,9 +187,9 @@ public function testChangeEclBranding(): void { $assert_session->elementExists('css', 'header.ecl-site-header div.ecl-site-header__top'); $assert_session->elementExists('css', 'header.ecl-site-header div.ecl-site-header__top div.ecl-site-header__action'); - // Make sure that 'Site name' banner is present in the site header - // for Core template. - $assert_session->elementExists('css', 'header.ecl-site-header .ecl-site-header__banner .ecl-container'); + // Make sure that banner is not present in the site header for + // the Core template, if the site name and menu are not shown. + $assert_session->elementNotExists('css', 'header.ecl-site-header .ecl-site-header__banner .ecl-container'); // Visit theme administration page. $this->drupalGet('/admin/appearance/settings/' . $active_theme);