mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-20 16:49:52 +00:00
Improve integration test timeouts
This commit is contained in:
parent
53218aba6e
commit
0c94263f0f
1 changed files with 18 additions and 7 deletions
|
|
@ -20,37 +20,48 @@ test("can load a skin via the query params", async () => {
|
|||
// If this test starts to fail, check that the cache-bust location of the skin has not changed.
|
||||
`http://localhost:8080/?skinUrl=_/skins/MacOSXAqua1-5-88dbd4e043795c98625462a908a2d965.wsz#{"disableMarquee":true}`
|
||||
);
|
||||
await page.evaluate(() => window.__webamp.skinIsLoaded());
|
||||
expect(await page.screenshot()).toMatchImageSnapshot();
|
||||
});
|
||||
|
||||
test("should render the Topaz skin", async () => {
|
||||
await page.goto(`http://localhost:8080/#{"disableMarquee":true}`);
|
||||
expect(page).toUploadFile("#webamp-file-input", "./skins/TopazAmp1-2.wsz");
|
||||
await expect(page).toUploadFile(
|
||||
"#webamp-file-input",
|
||||
"./skins/TopazAmp1-2.wsz"
|
||||
);
|
||||
await page.evaluate(() => window.__webamp.skinIsLoaded());
|
||||
expect(await page.screenshot()).toMatchImageSnapshot();
|
||||
});
|
||||
|
||||
test("should render a skin that defines transparent regions", async () => {
|
||||
await page.goto(`http://localhost:8080/#{"disableMarquee":true}`);
|
||||
expect(page).toUploadFile(
|
||||
await expect(page).toUploadFile(
|
||||
"#webamp-file-input",
|
||||
"./skins/Green-Dimension-V2.wsz"
|
||||
);
|
||||
await new Promise(resolve => setTimeout(resolve, 200));
|
||||
await page.evaluate(() => window.__webamp.skinIsLoaded());
|
||||
expect(await page.screenshot()).toMatchImageSnapshot();
|
||||
});
|
||||
|
||||
test("uses the volume spirtes as a fallback when balance spirtes are missing", async () => {
|
||||
await page.goto(`http://localhost:8080/#{"disableMarquee":true}`);
|
||||
expect(page).toUploadFile("#webamp-file-input", "./skins/AmigaPPC-dark.wsz");
|
||||
await new Promise(resolve => setTimeout(resolve, 200));
|
||||
await expect(page).toUploadFile(
|
||||
"#webamp-file-input",
|
||||
"./skins/AmigaPPC-dark.wsz"
|
||||
);
|
||||
await page.evaluate(() => window.__webamp.skinIsLoaded());
|
||||
expect(await page.screenshot()).toMatchImageSnapshot();
|
||||
});
|
||||
|
||||
test("pads empty space in the marquee with the space character", async () => {
|
||||
await page.goto(`http://localhost:8080/#{"disableMarquee":true}`);
|
||||
// This skin has noticeable light blue where it expects the marquee to always cover.
|
||||
expect(page).toUploadFile("#webamp-file-input", "./skins/Sonic_Attitude.wsz");
|
||||
await new Promise(resolve => setTimeout(resolve, 200));
|
||||
await expect(page).toUploadFile(
|
||||
"#webamp-file-input",
|
||||
"./skins/Sonic_Attitude.wsz"
|
||||
);
|
||||
await page.evaluate(() => window.__webamp.skinIsLoaded());
|
||||
await page.evaluate(() =>
|
||||
window.__webamp.store.dispatch({ type: "SET_FOCUS", input: "balance" })
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue