fix(playwright): recognize modern screenshot comparison errors - #2
Closed
dimazollo wants to merge 2 commits into
Closed
Conversation
dimazollo
force-pushed
the
fix/playwright-screenshot-error-detection
branch
from
September 7, 2026 21:15
e7708a8 to
edb83a5
Compare
Owner
Author
|
Submitted upstream as gemini-testing#808. Closing this preparation draft without merging; the source branch is still in use by the upstream PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Playwright 1.59.1 reports screenshot mismatches as:
The adapter only recognizes
Screenshot comparison failed, so it marks these as general errors even when expected/actual/diff images are attached. Accept can then leave a stale error instead of resolving the visual failure.This recognizes the newer page/locator and Buffer matcher headers, checking for matching diff attachments. Capture failures and unrelated assertion errors remain general errors; the old format still works. Only the adapter and its unit tests change. Platform handling is separate.
Reproduction
With Playwright 1.59.1 and
html-reporter/playwright:Before:
error/Error. After:fail/ImageDiffError.Tests
npm testpasses on Node 20.19.6, based on upstream 11.16.2 (a4e797c).The full GUI e2e suite and interactive Accept/Undo weren't rerun for this isolated fix.
Draft in the personal fork; upstream submission is pending CLA confirmation.