test(vrt): improve snapshot reliability - #8332
Conversation
|
There was a problem hiding this comment.
Pull request overview
This PR aims to improve Playwright VRT snapshot reliability by enforcing reduced motion by default and ensuring Storybook pages wait for fonts to load before screenshots are taken.
Changes:
- Sets reduced motion globally in the Playwright test configuration.
- Updates the Storybook
visithelper to wait fordocument.fonts.readybefore continuing. - Removes redundant per-test reduced motion media emulation calls.
Show a summary per file
| File | Description |
|---|---|
| playwright.config.ts | Attempts to enable reduced motion by default for all Playwright tests. |
| e2e/test-helpers/storybook.ts | Waits for font loading readiness before proceeding with image waits/snapshots. |
| e2e/components/TooltipV2.test.ts | Removes per-test reduced motion emulation now intended to be global. |
| e2e/components/SelectPanel.test.ts | Removes per-test reduced motion emulation now intended to be global (including forced-colors cases). |
Review details
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 4/13 changed files
- Comments generated: 1
- Review effort level: Lite
Update our snapshot reliability by using reduce motion by default and waiting for fonts to load before visiting a page / snapshotting it.
Changelog
New
Changed
Removed
Rollout strategy