Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
fix(ssim-cie94): increase SSIM window radius (#19343)
Andrey Lushnikov6139b432fd40
diff --git a/packages/playwright-core/src/image_tools/compare.ts b/packages/playwright-core/src/image_tools/compare.tsindex 2748d5a91c..4b79d36eb0 100644--- a/packages/playwright-core/src/image_tools/compare.ts+++ b/packages/playwright-core/src/image_tools/compare.ts@@ -18,7 +18,7 @@ import { blendWithWhite, colorDeltaE94, rgb2gray } from './colorUtils';import { ImageChannel } from './imageChannel';import { ssim, FastStats } from './stats';-const SSIM_WINDOW_RADIUS = 5;+const SSIM_WINDOW_RADIUS = 15;const VARIANCE_WINDOW_RADIUS = 1;function drawPixel(width: number, data: Buffer, x: number, y: number, r: number, g: number, b: number) {diff --git a/tests/image_tools/fixtures/should-match/webkit-rendering-artifacts/README.md b/tests/image_tools/fixtures/should-match/webkit-rendering-artifacts/README.mdnew file mode 100644index 0000000000..864638a9b1--- /dev/null+++ b/tests/image_tools/fixtures/should-match/webkit-rendering-artifacts/README.md@@ -0,0 +1,2 @@+A set of examples with rendering artifacts that happen when running Playwright+screenshot tests on WebKit linux.diff --git a/tests/image_tools/fixtures/should-match/webkit-rendering-artifacts/webkit-corner-pixel-actual.png b/tests/image_tools/fixtures/should-match/webkit-rendering-artifacts/webkit-corner-pixel-actual.pngnew file mode 100644index 0000000000..eae4aeb66eBinary files /dev/null and b/tests/image_tools/fixtures/should-match/webkit-rendering-artifacts/webkit-corner-pixel-actual.png differdiff --git a/tests/image_tools/fixtures/should-match/webkit-rendering-artifacts/webkit-corner-pixel-expected.png b/tests/image_tools/fixtures/should-match/webkit-rendering-artifacts/webkit-corner-pixel-expected.pngnew file mode 100644index 0000000000..ee469a947bBinary files /dev/null and b/tests/image_tools/fixtures/should-match/webkit-rendering-artifacts/webkit-corner-pixel-expected.png differdiff --git a/tests/image_tools/fixtures/should-match/webkit-rendering-artifacts/webkit-four-pixels-actual.png b/tests/image_tools/fixtures/should-match/webkit-rendering-artifacts/webkit-four-pixels-actual.pngnew file mode 100644index 0000000000..08d2831a89Binary files /dev/null and b/tests/image_tools/fixtures/should-match/webkit-rendering-artifacts/webkit-four-pixels-actual.png differdiff --git a/tests/image_tools/fixtures/should-match/webkit-rendering-artifacts/webkit-four-pixels-expected.png b/tests/image_tools/fixtures/should-match/webkit-rendering-artifacts/webkit-four-pixels-expected.pngnew file mode 100644index 0000000000..2c2af04401Binary files /dev/null and b/tests/image_tools/fixtures/should-match/webkit-rendering-artifacts/webkit-four-pixels-expected.png differdiff --git a/tests/image_tools/fixtures/should-match/webkit-rendering-artifacts/webkit-pixel-actual.png b/tests/image_tools/fixtures/should-match/webkit-rendering-artifacts/webkit-pixel-actual.pngnew file mode 100644index 0000000000..4bfd39f4b3Binary files /dev/null and b/tests/image_tools/fixtures/should-match/webkit-rendering-artifacts/webkit-pixel-actual.png differdiff --git a/tests/image_tools/fixtures/should-match/webkit-rendering-artifacts/webkit-pixel-expected.png b/tests/image_tools/fixtures/should-match/webkit-rendering-artifacts/webkit-pixel-expected.pngnew file mode 100644index 0000000000..2c2af04401Binary files /dev/null and b/tests/image_tools/fixtures/should-match/webkit-rendering-artifacts/webkit-pixel-expected.png differ