Skip to content

Commit

Permalink
Try to fix flakey test
Browse files Browse the repository at this point in the history
  • Loading branch information
Niels-IO committed Dec 1, 2023
1 parent 114f4db commit 581aa95
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions example/test/e2e/imageSizeTest.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ for (let index = 0; index < widths.length; index++) {
await img.click();

const image = await getImageById(page, "test_image_static_fixed");
await expect(image).toHaveScreenshot();
expect(image.currentSrc).toBe(
`http://localhost:8080${basePath}/nextImageExportOptimizer/chris-zhang-Jq8-3Bmh1pQ-unsplash_static.921260e0-opt-384.${
imagesWebP ? "WEBP" : "JPG"
Expand All @@ -567,6 +568,7 @@ for (let index = 0; index < widths.length; index++) {
page,
"test_image_static_fixed_future"
);
await expect(image_future).toHaveScreenshot();
expect(image_future.currentSrc).toBe(
`http://localhost:8080${basePath}/nextImageExportOptimizer/chris-zhang-Jq8-3Bmh1pQ-unsplash_static.921260e0-opt-384.${
imagesWebP ? "WEBP" : "JPG"
Expand Down

0 comments on commit 581aa95

Please sign in to comment.