← Back to microsoft/playwright
microsoft / playwright · Issue No. 42393
Add an Update snapshot action to each IMAGE DIFF section in UI Mode's Attachments panel.
The existing IMAGE DIFF header would remain sticky while scrolling through the comparison, with Update snapshot replacing that screenshot's expected snapshot with the actual screenshot.
This follows existing UI Mode patterns where actions are placed in a sticky header for the content they operate on, for example the Source panel actions:
https://github.com/user-attachments/assets/8d2c998b-2e56-4132-bccc-d3b23305bb1c
After a failed test run with failing snapshots:
Update snapshot for any intentional change which should have the current snapshot replaced by the Actual snapshotThe existing Attachments panel:
The proposed action would be added to the existing IMAGE DIFF header:
IMAGE DIFF Update snapshot
──────────────────────────────────────────────────────────────────
Diff Actual Expected Side by side Slider
The header would remain sticky while scrolling through a large comparison. The action only appears for IMAGE DIFF sections, not other attachments.
Alternative designs can be seen in prior art:
When several screenshot assertions fail, UI Mode lets you review each diff, but not update an intentional change directly from that diff.
I'm aware that Playwright v1.56+ supports updateSnapshots in UI Mode (issue #37007 + PR #37098), but the current workflow has a few drawbacks:
Relay reads this issue against the repository's contribution signals: the files it is likely to touch, how the maintainers triage work this size, and what the first contribution would exercise.
The full analysis for this issue is still being assembled. Until then, the description above and the thread on GitHub are the most reliable context.