-
Notifications
You must be signed in to change notification settings - Fork 663
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
077fa94
commit d175746
Showing
8 changed files
with
278 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
displayName: "integration-test", | ||
rootDir: "../", | ||
preset: "jest-puppeteer", | ||
testRegex: "\\.integration-test\\.js$" | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
server: { | ||
// Note: We require the the build be run before these tests. | ||
// TODO: Figure out how to get this command to run the buil. | ||
command: "npm run serve", | ||
port: 8080 // Jest Puppeteer will wait 5000ms for this port to come online. | ||
} | ||
}; |
Binary file added
BIN
+64.5 KB
...pshots__/baseline-integration-test-js-should-render-the-default-skin-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+116 KB
...napshots__/baseline-integration-test-js-should-render-the-topaz-skin-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const { toMatchImageSnapshot } = require("jest-image-snapshot"); | ||
|
||
expect.extend({ toMatchImageSnapshot }); | ||
|
||
beforeAll(async () => { | ||
await page.goto(`http://localhost:8080/#{"disableMarquee":true}`); | ||
}); | ||
|
||
it("should render the default skin", async () => { | ||
expect(await page.screenshot()).toMatchImageSnapshot(); | ||
}); | ||
|
||
it("should render the Topaz skin", async () => { | ||
expect(page).toUploadFile("#webamp-file-input", "./skins/TopazAmp1-2.wsz"); | ||
await new Promise(resolve => setTimeout(resolve, 200)); | ||
expect(await page.screenshot()).toMatchImageSnapshot(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.