Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanjamal committed May 25, 2023
1 parent 62436a7 commit e2eb105
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions packages/header/src/__tests__/Header.screenshots.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ describe('Header screenshots', () => {
test('header open nav item w/ 1 subnav group', async () => {
await screenshotMatchClick(
mainPageURL,
'#root button[aria-label="Navigation menu"], nav[data-nav-type="burger-menu"] #nav-item-Carreviews',
'#root button[aria-label="Navigation menu"], nav[data-nav-type="burger-menu"] #burger-nav-item-Carreviews',
{
animations: 'disabled',
},
Expand All @@ -195,7 +195,7 @@ describe('Header screenshots', () => {
test('header open nav item w/ 2 subnav groups', async () => {
await screenshotMatchClick(
mainPageURL,
'#root button[aria-label="Navigation menu"], nav[data-nav-type="burger-menu"] #nav-item-CarsbyLocation',
'#root button[aria-label="Navigation menu"], nav[data-nav-type="burger-menu"] #burger-nav-item-CarsbyLocation',
{
animations: 'disabled',
},
Expand All @@ -208,7 +208,7 @@ describe('Header screenshots', () => {
test('header open nav item w/ 3 subnav groups', async () => {
await screenshotMatchClick(
mainPageURL,
'#root button[aria-label="Navigation menu"], nav[data-nav-type="burger-menu"] #nav-item-NewsGuides',
'#root button[aria-label="Navigation menu"], nav[data-nav-type="burger-menu"] #burger-nav-item-NewsGuides',
{
animations: 'disabled',
},
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions packages/header/src/__tests__/headerItemHelpers.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ describe('headerItemHelpers', () => {
hasHeaderItems(
{ label: 'search', hide: false, Component: <a /> },
{ label: 'favs', hide: undefined },
{ currentLang: 'en-EN', hide: false },
{ currentLang: 'en-GB', hide: false },
{ label: 'account' },
{ label: 'call', hide: false },
);
Expand All @@ -161,7 +161,7 @@ describe('headerItemHelpers', () => {
hasHeaderItems(
{ label: 'search', hide: true, Component: <a /> },
undefined,
{ currentLang: 'en-EN', hide: true },
{ currentLang: 'en-GB', hide: true },
undefined,
undefined,
);
Expand Down
4 changes: 2 additions & 2 deletions packages/header/src/__tests__/navigationHelpers.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ describe('navigationHelpers', () => {
},
];
const langItemConfig = {
currentLang: 'en-EN',
currentLang: 'en-GB',
options: LANG_OPTIONS,
hide: true,
};
Expand Down Expand Up @@ -189,7 +189,7 @@ describe('navigationHelpers', () => {
...testNav,
{
isBurgerMenuOnly: true,
label: 'Select Language',
label: 'English',
subNavGroups: [
{
heading: DEFAULT_LOCALE.langListHeading,
Expand Down
5 changes: 5 additions & 0 deletions packages/header/src/styles/navigationDropdown.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
color: #fff;
transition: color 0.3s ease, background 0.3s ease;

& > span {
width: 100%;
white-space: nowrap;
}

&.isActive,
&.isCurrentPage,
&:hover,
Expand Down

0 comments on commit e2eb105

Please sign in to comment.