Skip to content

Commit

Permalink
test: increase time
Browse files Browse the repository at this point in the history
  • Loading branch information
etowahadams committed Nov 16, 2023
1 parent ec215c0 commit 28a4661
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions e2e/performance.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ test('Measure zoom time', async ({ page, browser }, testInfo) => {
const zoomTime = endTime - startTime;
console.log(`Zoom time: ${zoomTime}ms`);

// Just make sure the zoom time is less than 8 seconds. This is how long it in CI
expect(zoomTime).toBeLessThan(8000);
// Just make sure the zoom time is less than 9 seconds. This is how long it in CI
expect(zoomTime).toBeLessThan(9000);
});
3 changes: 0 additions & 3 deletions e2e/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@ export function isPngSame(newImg: Buffer, oldImg: Buffer) {
// check if the images have the same dimensions
if (img1.width !== img2.width || img1.height !== img2.height) return false;

console.warn('same size');

const { width, height } = img1;
const diff = new PNG({ width, height });
const pixeldifference = pixelmatch(img1.data, img2.data, diff.data, width, height, { threshold: 0.1 });
console.warn(`pixel difference: ${pixeldifference}`);
// only write to file if there is a difference in the images
return pixeldifference === 0;
}
Expand Down

0 comments on commit 28a4661

Please sign in to comment.