From 805307215d7f436539364ae5a490c8062cc2583b Mon Sep 17 00:00:00 2001 From: Ratko Zagorac Date: Thu, 26 Sep 2024 09:53:15 +0200 Subject: [PATCH] MWPW-159126: Fix lint --- edsdme/scripts/utils.js | 4 ++-- test/scripts/utils.jest.js | 18 +++--------------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/edsdme/scripts/utils.js b/edsdme/scripts/utils.js index bfb7339..62236ba 100644 --- a/edsdme/scripts/utils.js +++ b/edsdme/scripts/utils.js @@ -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; } @@ -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; } diff --git a/test/scripts/utils.jest.js b/test/scripts/utils.jest.js index 1b17ab3..218a96a 100644 --- a/test/scripts/utils.jest.js +++ b/test/scripts/utils.jest.js @@ -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 = { @@ -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 = { @@ -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 = {