Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions test/compare-images.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ test(
test(
'should compare viewport screenshots',
setupTest(async (page, browser) => {
await page.waitForJsTimers(200);
const firstResult = await page.captureViewport();
await browser.refresh();
await page.waitForJsTimers(200);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gradually increased this value until the build passed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid fluctuations, does it make sense to go slightly over the passed value?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can assume the current value is already "slightly over". To find the exact timing, I am doing additional investigation in #134

const secondResult = await page.captureViewport();
await expect(cropAndCompare(firstResult, secondResult)).resolves.toEqual({
firstImage: expect.any(Buffer),
Expand Down
Loading