Skip to content

Commit

Permalink
Fix broken gnav test (#1699)
Browse files Browse the repository at this point in the history
* Fix broken gnav test

* Cleanup
  • Loading branch information
mokimo authored Jan 4, 2024
1 parent e28b79f commit a13ad40
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/blocks/gnav/gnav.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('Gnav', () => {
client_id: 'milo',
scope: 'gnav',
};
window.adobeIMS = { getAccessToken: () => false };
window.adobeIMS = { getAccessToken: () => false, isSignedInUser: () => false };
});

after(() => {
Expand Down Expand Up @@ -172,6 +172,11 @@ describe('Gnav', () => {

describe('Localized Gnav', () => {
before(async () => {
window.adobeid = {
client_id: 'milo',
scope: 'gnav',
};
window.adobeIMS = { getAccessToken: () => false, isSignedInUser: () => false };
// Load Localized Gnav
await loadDefaultHtml();
document.head.getElementsByTagName('meta')[0].setAttribute('content', '/test/blocks/gnav/mocks/simple-gnav');
Expand All @@ -187,6 +192,8 @@ describe('Localized Gnav', () => {
setConfig(config);
await loadDefaultHtml();
gnav = await mod.default(document.querySelector('header'));
delete window.adobeid;
delete window.adobeIMS;
});

it('Test Gnav Localized Links', async () => {
Expand Down

0 comments on commit a13ad40

Please sign in to comment.