diff --git a/packages/webamp/jest-puppeteer.config.js b/packages/webamp/jest-puppeteer.config.js index 31b6ceb9..07cf8fb5 100644 --- a/packages/webamp/jest-puppeteer.config.js +++ b/packages/webamp/jest-puppeteer.config.js @@ -1,4 +1,7 @@ module.exports = { + launch: { + dumpio: true, + }, server: { // Note: We require the the build be run before these tests. // TODO: Figure out how to get this command to run the build. diff --git a/packages/webamp/js/__tests__/baseline.integration-test.js b/packages/webamp/js/__tests__/baseline.integration-test.js index 81c19316..b68f51f9 100644 --- a/packages/webamp/js/__tests__/baseline.integration-test.js +++ b/packages/webamp/js/__tests__/baseline.integration-test.js @@ -1,5 +1,6 @@ /* global page */ const { toMatchImageSnapshot } = require("jest-image-snapshot"); +const path = require("path"); expect.extend({ toMatchImageSnapshot }); @@ -38,7 +39,7 @@ test("should render the Topaz skin", async () => { await page.goto(`${DOMAIN}/#{"disableMarquee":true}`); await expect(page).toUploadFile( "#webamp-file-input", - "./skins/TopazAmp1-2.wsz" + path.join(__dirname, "../../demo/skins/TopazAmp1-2.wsz") ); await page.evaluate(() => window.__webamp.skinIsLoaded()); expect(await page.screenshot()).toMatchImageSnapshot(snapshotOptions); @@ -48,7 +49,7 @@ test("should render a skin that defines transparent regions", async () => { await page.goto(`${DOMAIN}/#{"disableMarquee":true}`); await expect(page).toUploadFile( "#webamp-file-input", - "./skins/Green-Dimension-V2.wsz" + path.join(__dirname, "../../demo/skins/Green-Dimension-V2.wsz") ); await page.evaluate(() => window.__webamp.skinIsLoaded()); expect(await page.screenshot()).toMatchImageSnapshot(snapshotOptions); @@ -58,7 +59,7 @@ test("uses the volume spirtes as a fallback when balance spirtes are missing", a await page.goto(`${DOMAIN}/#{"disableMarquee":true}`); await expect(page).toUploadFile( "#webamp-file-input", - "./skins/AmigaPPC-dark.wsz" + path.join(__dirname, "../../demo/skins/AmigaPPC-dark.wsz") ); await page.evaluate(() => window.__webamp.skinIsLoaded()); expect(await page.screenshot()).toMatchImageSnapshot(snapshotOptions); @@ -69,7 +70,7 @@ test("pads empty space in the marquee with the space character", async () => { // This skin has noticeable light blue where it expects the marquee to always cover. await expect(page).toUploadFile( "#webamp-file-input", - "./skins/Sonic_Attitude.wsz" + path.join(__dirname, "../../demo/skins/Sonic_Attitude.wsz") ); await page.evaluate(() => window.__webamp.skinIsLoaded()); await page.evaluate(() =>