test(e2e): add Playwright visual regression tests#863
Open
Alain-L wants to merge 3 commits into
Open
Conversation
added 3 commits
January 6, 2026 14:19
Add comprehensive e2e tests using Playwright with visual snapshots: - 14 sample plans tested across light and dark themes - 114 total visual regression tests (14 samples × 4 tabs × 2 themes + 2 home) - Playwright configuration with dev server integration - Export window.samples for test access to sample plans - Exclude e2e folder from vitest to avoid conflicts
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
Add visual regression tests using Playwright to catch unintended UI changes.
Usage
What's included
Files added/modified
e2e/visual.spec.tsplaywright.config.tspackage.jsonvitest.config.tse2e/from unit testsexample/src/App.vuewindow.samplesfor tests.gitignoreNotes
window.samplesexposure: Tests load samples viawindow.samplesinstead of navigating through the UI. This is faster and more stable, but requires exposing data onwindow. This could be wrapped inif (import.meta.env.DEV)if preferred.Snapshots not committed: Snapshots are generated locally and excluded from git. This avoids bloating the repo but means each environment generates its own baseline, which can cause inconsistencies (fonts, rendering). Committing CI-generated snapshots as reference could be considered to follow best practices.
Screenshots in HTML report: By default, screenshots only appear in the report on failure. To include them for passing tests, use
testInfo.attach():