Skip to content

Commit

Permalink
EWPP-4146: Add extra class to inpage navigation block to ensure is al…
Browse files Browse the repository at this point in the history
…ways displayed on top.
  • Loading branch information
22Alexandra committed Jun 18, 2024
1 parent ca68d81 commit f9d821a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{% include '@ecl-twig/inpage-navigation' with {
'title': title,
'icon_path': ecl_icon_path,
'extra_classes': 'oe-theme-ecl-inpage-navigation',
'extra_classes': 'oe-theme-ecl-inpage-navigation ecl-u-z-dropdown',
'extra_attributes': [
{
'name': 'data-ecl-auto-initialized',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function testLibrary(): void {
// The heading starting with a non-alpha character gets a ref- prepended.
$this->assertEquals('ref-2022-a-new-year', $container->find('xpath', '/h3[@class="heading"][text()="2022, a new year"]')->getAttribute('id'));

$navigation = $assert_session->elementExists('css', '.oe-theme-ecl-inpage-navigation');
$navigation = $assert_session->elementExists('css', '.oe-theme-ecl-inpage-navigation.ecl-u-z-dropdown');

$assert = new InPageNavigationAssert();
$expected = [
Expand Down Expand Up @@ -169,7 +169,7 @@ public function testMultipleContainers(): void {
$this->assertCount(14, $main_content->findAll('xpath', '//*[@id]'));

$first_container = $main_content->find('css', '.first-container');
$navigation = $assert_session->elementExists('css', '.oe-theme-ecl-inpage-navigation', $first_container);
$navigation = $assert_session->elementExists('css', '.oe-theme-ecl-inpage-navigation.ecl-u-z-dropdown', $first_container);
$assert = new InPageNavigationAssert();
$expected = [
'title' => 'First nav',
Expand All @@ -191,7 +191,7 @@ public function testMultipleContainers(): void {
$assert->assertPattern($expected, $navigation->getOuterHtml());

$second_container = $main_content->find('css', '.second-container');
$navigation = $assert_session->elementExists('css', '.oe-theme-ecl-inpage-navigation', $second_container);
$navigation = $assert_session->elementExists('css', '.oe-theme-ecl-inpage-navigation.ecl-u-z-dropdown', $second_container);
$assert = new InPageNavigationAssert();
$expected = [
'title' => 'Second nav',
Expand Down

0 comments on commit f9d821a

Please sign in to comment.