Skip to content

Commit

Permalink
MWPW-159126: Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
zagi25 committed Sep 26, 2024
1 parent c1c72dd commit 8053072
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
4 changes: 2 additions & 2 deletions edsdme/scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ export function updateNavigation(locales) {
const { prefix } = getLocale(locales);
let { content } = gnavMeta;
if (isMember()) {
content = getMetadataContent('gnav-loggedin-source') ?? `${prefix}/edsdme/partners-shared/loggedin-gnav`
content = getMetadataContent('gnav-loggedin-source') ?? `${prefix}/edsdme/partners-shared/loggedin-gnav`;
}
gnavMeta.content = content.startsWith('/edsdme') ? prefix + content : content;
}
Expand All @@ -420,7 +420,7 @@ export function updateFooter(locales) {
const { prefix } = getLocale(locales);
let { content } = footerMeta;
if (isMember()) {
content = getMetadataContent('footer-loggedin-source') ?? `${prefix}/edsdme/partners-shared/loggedin-footer`;
content = getMetadataContent('footer-loggedin-source') ?? `${prefix}/edsdme/partners-shared/loggedin-footer`;
}
footerMeta.content = content.startsWith('/edsdme') ? prefix + content : content;
}
Expand Down
18 changes: 3 additions & 15 deletions test/scripts/utils.jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,7 @@ describe('Test utils.js', () => {
expect(footerPathModified).toEqual(protectedFooterPath);
});
it('Public footer is fetched based on locale', async () => {
const cookieObject = {
CPP: {
status: 'NOT_MEMBER',
}
};
const cookieObject = { CPP: { status: 'NOT_MEMBER' } };
document.cookie = `partner_data=${JSON.stringify(cookieObject)}`;
window.location.pathname = '/de/channelpartners/';
const locales = {
Expand Down Expand Up @@ -147,11 +143,7 @@ describe('Test utils.js', () => {
expect(gnavPathModified).toEqual(protectedGnavPath);
});
it('Public gnav is fetched based on locale', async () => {
const cookieObject = {
CPP: {
status: 'NOT_MEMBER',
}
};
const cookieObject = { CPP: { status: 'NOT_MEMBER' } };
document.cookie = `partner_data=${JSON.stringify(cookieObject)}`;
window.location.pathname = '/de/channelpartners/';
const locales = {
Expand All @@ -165,11 +157,7 @@ describe('Test utils.js', () => {
expect(gnavPathModified).toEqual('/de/edsdme/partners-shared/public-gnav');
});
it('Protected gnav is fetched based on locale if gnav-loggeding-source metadata is not present', async () => {
const cookieObject = {
CPP: {
status: 'MEMBER',
}
};
const cookieObject = { CPP: { status: 'MEMBER' } };
document.cookie = `partner_data=${JSON.stringify(cookieObject)}`;
window.location.pathname = '/de/channelpartners/';
const locales = {
Expand Down

0 comments on commit 8053072

Please sign in to comment.