Skip to content

Commit

Permalink
Fix a test
Browse files Browse the repository at this point in the history
  • Loading branch information
TsayAdobe committed Sep 27, 2024
1 parent 1b479f1 commit 73baf4b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/scripts/scripts-preloads.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ describe('Test scripts.js configurable preloads', () => {
document.head.innerHTML = '<link rel="icon" href="data:,"><meta name="preloads" content="$MILOLIBS/blocks/marquee/marquee.js,$MILOLIBS/blocks/marquee/marquee.css,https://www.example.com/abc.js"/>';
document.body.innerHTML = '<main><div class="marquee"></main>';
await import('../../acrobat/scripts/scripts.js');
await waitForElement('link[rel="stylesheet"][href="/acrobat/styles/styles.css"]');
const js = document.querySelector('link[rel="preload"][href="https://main--milo--adobecom.hlx.page/libs/blocks/marquee/marquee.js"]');
const css = document.querySelector('link[rel="stylesheet"][href="https://main--milo--adobecom.hlx.page/libs/blocks/marquee/marquee.css"]');
const js = document.querySelector('link[rel="preload"][href="https://main--milo--adobecom.hlx.live/libs/blocks/marquee/marquee.js"]');
const css = document.querySelector('link[rel="stylesheet"][href="https://main--milo--adobecom.hlx.live/libs/blocks/marquee/marquee.css"]');
const other = document.querySelector('link[rel="preload"][href="https://www.example.com/abc.js"]');
const acrobatcss = document.querySelector('link[rel="stylesheet"][href="/acrobat/styles/styles.css"]');
const milocss = document.querySelector('link[rel="stylesheet"][href="https://main--milo--adobecom.hlx.page/libs/styles/styles.css"]');
const milocss = document.querySelector('link[rel="stylesheet"][href="https://main--milo--adobecom.hlx.live/libs/styles/styles.css"]');
expect(js).not.to.be.null;
expect(css).not.to.be.null;
expect(other).not.to.be.null;
Expand Down

0 comments on commit 73baf4b

Please sign in to comment.