-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Setup VRT #3894
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
base: main
Are you sure you want to change the base?
Setup VRT #3894
Conversation
|
|
||
| env: | ||
| AUTHOR_NAME: 'github-actions[bot]' | ||
| AUTHOR_EMAIL: '41898282+github-actions[bot]@users.noreply.github.com' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copied some of the instructions from https://vitest.dev/guide/browser/visual-regression-testing.html#the-update-workflow
| /> | ||
| ); | ||
|
|
||
| await expect(getGrid()).toMatchScreenshot('basic-grid'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can tweak the match options if needed
https://vitest.dev/guide/browser/visual-regression-testing.html#global-configuration
Co-authored-by: amanmahajan7
Co-authored-by: amanmahajan7
| git config --global user.email "${{ env.AUTHOR_EMAIL }}" | ||
| git add test/visual/__screenshots__/. | ||
| git diff-index --quiet HEAD || git commit -m "${{ env.COMMIT_MESSAGE }}" | ||
| git push --set-upstream origin ${{ github.head_ref }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work for forked repos?
Do we need --set-upstream?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work for forked repos?
Not sure. We can revisit if needed. Wdyt?
Do we need --set-upstream?
Not needed
Co-authored-by: Nicolas Stepien <[email protected]>
Co-authored-by: amanmahajan7
Co-authored-by: Nicolas Stepien <[email protected]>
This reverts commit 6928269.
Co-authored-by: amanmahajan7
https://vitest.dev/guide/browser/visual-regression-testing.html#visual-regression-testing
This PR sets up VRT. We can use
Update Screenshotslabel to update screenshots when needed