Skip to content

Commit 2ff0c86

Browse files
committed
fix: add maxDiffPixels to both snapshot calls in static test
The first toMatchSnapshot call (line 37) was missing maxDiffPixels, causing failures even though the second call had it.
1 parent a002424 commit 2ff0c86

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/src/end-to-end/static/static.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ test.describe("Check static rendering", () => {
3434
],
3535
scale: "css",
3636
}),
37-
).toMatchSnapshot("static-rendering-equality.png");
37+
).toMatchSnapshot("static-rendering-equality.png", {
38+
// Allowance for variations in the image caption text. The placehold.co
39+
// URL renders differently (e.g., '×' vs 'x' character) between runs.
40+
maxDiffPixels: 200,
41+
});
3842

3943
await page.goto(BASIC_BLOCKS_STATIC_URL);
4044
await page.waitForLoadState("networkidle");

0 commit comments

Comments
 (0)