Skip to content

docs(snapshots): clarify that threshold defines which pixels are different - #42998

Merged
Dmitry Gozman (dgozman) merged 1 commit into
microsoft:mainfrom
dgozman:fix-42959
Sep 29, 2026
Merged

Dmitry Gozman (dgozman) merged 1 commit into
microsoft:mainfrom
dgozman:fix-42959

Conversation

@dgozman

Copy link
Copy Markdown
Collaborator

Summary

  • maxDiffPixels and maxDiffPixelRatio docs now point to threshold, which defines which pixels are considered different.
  • The "Visual comparisons" guide section covers both maxDiffPixels and threshold.

Fixes #42959

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

5 flaky ⚠️ [chromium-library] › library/browsercontext-page-event.spec.ts:173 › should work with Ctrl-clicking `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-page] › page/workers.spec.ts:191 › should attribute network activity for worker inside iframe to the iframe `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:257 › third party 'Partitioned;' cookies `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:470 › top level 'Partitioned;' cookie and same origin iframe `@firefox-ubuntu-22.04-node20`
⚠️ [webkit-library] › library/video.spec.ts:152 › screencast › should continue recording main page after popup closes `@webkit-ubuntu-22.04-node20`

52383 passed, 1243 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [chromium] › mcp/sse.spec.ts:196 › sse transport browser lifecycle (persistent) @mcp-ubuntu-latest-chromium

8828 passed, 1480 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Hi, I'm the Playwright bot and I took a first look at the CI failures.

🟢 The one failure is a pre-existing flake, not caused by this PR

mcp/sse.spec.ts:196 fails the same way on main, and this PR only changes docs and the generated test.d.ts comments.

Details

This PR (b3e4abc) edits the docs for the threshold snapshot option and regenerates the JSDoc in packages/playwright/types/test.d.ts. No runtime code changes, so the MCP SSE transport can't be affected.

Pre-existing flake / infra

Triaged by the Playwright bot - agent run

@dgozman
Dmitry Gozman (dgozman) merged commit 0bd86d5 into microsoft:main Sep 29, 2026
44 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs]: maxDiffPixels: 0 is not an exact comparison — say that threshold still applies

2 participants