Add Playwright visual regression snapshot tests - #674
Open
ellaevans2323-pixel wants to merge 1 commit into
Open
Conversation
Adds pixel-diff visual regression coverage for the landing page across the core responsive breakpoints (Mobile 375px, Tablet 768px, Desktop 1440px) using Playwright's built-in screenshot comparison. Animations and transitions are frozen before each capture to keep diffs deterministic across runs. Configures a 2% max pixel-diff ratio tolerance in playwright.config.ts, and adds test:visual / test:visual:update npm scripts for generating and refreshing baselines locally. CI now caches Playwright's browser binaries and persists visual baseline snapshots as a keyed cache artifact (auto-created on first run, diffed against on subsequent runs), with diff artifacts uploaded on failure for debugging. Closes StellarFlow-Network#603
|
@ellaevans2323-pixel Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Summary
e2e/visual.spec.ts: full-page pixel-diff screenshot tests of the landing page at the three core responsive breakpoints (Mobile 375px, Tablet 768px, Desktop 1440px), with animations/transitions frozen before each capture for deterministic diffs.expect.toHaveScreenshotinplaywright.config.tswith a 2% max pixel-diff ratio tolerance.test:e2e,test:visual, andtest:visual:updatenpm scripts (the latter for regenerating baselines locally)..github/workflows/e2e.ymlto cache Playwright's browser binaries and to persist visual baseline snapshots via a keyedactions/cacheentry — first CI run auto-creates baselines, subsequent runs diff against them — plus uploads diff artifacts on failure for debugging.Closes #603
Notes
mainindependent of this change (ErrorBoundaryis not exported fromsrc/components/ui/index.ts, referenced bysrc/app/DashboardInteractive.tsx), which also blocksnpm run buildin the existing e2e CI job. That's a pre-existing issue outside the scope of 🧪 Visual-Regression | Automated Playwright Visual Regression Snapshot Tests #603 — worth a follow-up fix so this workflow (and the new visual tests) can actually run in CI.npm run test:visual:updateonce the build issue above is resolved.Test plan
npx eslint e2e/visual.spec.ts playwright.config.tspassesnpx tsc --noEmitshows no new type errorsnpm run test:visuallocally once the unrelated build failure noted above is fixed