-
Notifications
You must be signed in to change notification settings - Fork 31
ci: integrated visual tests via playwright #670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Contributor
|
Preview is ready. |
76e35cf to
8ccbbcb
Compare
b5f32fa to
a79090f
Compare
d3m1d0v
reviewed
Mar 12, 2025
d3m1d0v
approved these changes
Mar 13, 2025
652bb19 to
7133e8a
Compare
e143a8b to
c4b0643
Compare
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.
This PR introduces Playwright visual testing to ensure UI consistency in PRs, enhancing code quality and preventing unintended UI changes.
What's Included?
1. GitHub Workflows
PR Visual Tests– Runs Playwright visual tests for every PR.PR Visual Tests Report– Posts test reports as comments in the PR.2. New Commands in
package.jsonTo streamline testing, the following commands have been added:
playwright:install– Installs Playwright with Chromium and Webkitplaywright– Runs visual testsplaywright:update– Updates snapshotsplaywright:clear– Clears test cacheplaywright:report– Displays test results reportplaywright:docker– Runs tests in Docker for local pre-PR validationplaywright:docker:update– Updates snapshots in Docker for consistency across environmentsplaywright:docker:clear– Clears cache in Docker for local testingplaywright:docker:report– Displays test results report in Docker3. Dependencies Added
@playwright/test– Core package for running Playwright tests.@playwright/experimental-ct-react– Enables React component testing via Playwright. (Experimental Storybook package)4. Test Configuration
playwright.config.ts– Configures tests to run in Chromium and Webkit with React support via Vite.5. Visual Tests
Snapshots are stored in
__snapshots__for verification.6. Documentation
Added a new doc explaining Playwright visual testing, setup, and usage.