From 1dc581c1a0b8cfbc3c36b02e898a4a4978c54f31 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Thu, 10 Mar 2022 21:26:31 -0700 Subject: [PATCH] test: fix test that gave 2 pixel screenshot diff on Linux (#12671) --- tests/page/page-screenshot.spec.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/page/page-screenshot.spec.ts b/tests/page/page-screenshot.spec.ts index 42804eb121..04acb48cf1 100644 --- a/tests/page/page-screenshot.spec.ts +++ b/tests/page/page-screenshot.spec.ts @@ -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, + }); }); });