Skip to content

Commit

Permalink
OEL-779: Fix Whitelabel issues with navigation.
Browse files Browse the repository at this point in the history
  • Loading branch information
escuriola committed Feb 2, 2022
1 parent 25dacc5 commit a16969c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion templates/patterns/navigation/pattern-navigation.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
'pills': variant == 'pills',
'vertical': orientation == 'vertical',
'tabs': variant == 'tabs',
'nav': true,
'nav': variant != 'default',
'tabs_content': false,
'navbar': false,
'attributes': attributes,
Expand Down
26 changes: 13 additions & 13 deletions tests/src/Kernel/fixtures/markup_rendering_patterns/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ navigation_default:
active: true
assertions:
count:
'nav[data-drupal-selector="navigation"]': 1
'nav.nav-pills': 0
'ul[data-drupal-selector="navigation"]': 1
'.nav-pills': 0
'.nav-tabs': 0
'.nav-link': 4
'.nav-link.active': 1
Expand All @@ -99,10 +99,10 @@ navigation_default:
'button.nav-link.active': 1
'nav.flex-column': 0
equals:
'.nav-link:nth-child(1)': 'I am a link'
'.nav-link:nth-child(2)': 'I am a button'
'.nav-link:nth-child(3)': 'I am a disabled button'
'.nav-link:nth-child(4)': 'I am an active button'
'li.nav-item:nth-child(1) > a': 'I am a link'
'li.nav-item:nth-child(2) > button': 'I am a button'
'li.nav-item:nth-child(3) > button': 'I am a disabled button'
'li.nav-item:nth-child(4) > button': 'I am an active button'
navigation_default_vertical:
render:
'#type': pattern
Expand Down Expand Up @@ -141,21 +141,21 @@ navigation_default_vertical:
active: true
assertions:
count:
'nav[data-drupal-selector="navigation"]': 1
'nav.nav-pills': 0
'ul[data-drupal-selector="navigation"]': 1
'.nav-pills': 0
'.nav-tabs': 0
'.nav-link': 4
'.nav-link.active': 1
'a#dropdown-1[data-bs-toggle="dropdown"]': 1
'button.nav-link[disabled]': 1
'button.nav-link.active': 1
'nav.justify-content-left': 0
'nav.flex-column': 1
'ul.flex-column': 1
equals:
'.nav-link:nth-child(1)': 'I am a link'
'.nav-link:nth-child(2)': 'I am a button'
'.nav-link:nth-child(3)': 'I am a disabled button'
'.nav-link:nth-child(4)': 'I am an active button'
'li.nav-item:nth-child(1) > a': 'I am a link'
'li.nav-item:nth-child(2) > button': 'I am a button'
'li.nav-item:nth-child(3) > button': 'I am a disabled button'
'li.nav-item:nth-child(4) > button': 'I am an active button'
navigation_pills_vertical:
render:
'#type': pattern
Expand Down

0 comments on commit a16969c

Please sign in to comment.