Skip to content

Commit

Permalink
EWPP-2881: Update test coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
sergepavle committed Dec 12, 2022
1 parent e00a9c4 commit 3b48b3f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 7 additions & 1 deletion tests/src/Behat/OeThemeTestContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}

/**
Expand Down
6 changes: 3 additions & 3 deletions tests/src/Functional/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3b48b3f

Please sign in to comment.