test: fix test that gave 2 pixel screenshot diff on Linux (#12671)

This commit is contained in:
Andrey Lushnikov 2022-03-10 21:26:31 -07:00 committed by GitHub
parent b51157bdea
commit 1dc581c1a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -728,8 +728,12 @@ it.describe('page screenshot animations', () => {
page.screenshot({ fonts: 'ready' }),
server.serveFile(serverRequest, serverResponse),
]);
expect(iconsScreenshot).toMatchSnapshot('screenshot-web-font.png');
expect(noIconsScreenshot).not.toMatchSnapshot('screenshot-web-font.png');
expect(iconsScreenshot).toMatchSnapshot('screenshot-web-font.png', {
maxDiffPixels: 3,
});
expect(noIconsScreenshot).not.toMatchSnapshot('screenshot-web-font.png', {
maxDiffPixels: 3,
});
});
});