-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: Compare snapshot with file outside test snapshot directory #30898
Comments
You can control the way your expectations are matched with https://playwright.dev/docs/api/class-testproject#test-project-snapshot-path-template and the actual toHaveScreenshot name parameter. Do you think you can use these two to achieve your goal? |
Unfortunately not. Maybe some example will give more insights.
For now I am keeping the redundant files. |
with the snapshot dir template set as this: |
Closing as per above, please feel free to open a new issue if this does not cover your use case. |
馃殌 Feature Request
Allow to pass outside test dir snapshot file to toHaveScreenshot function
Example
// tests/B/B.test.js
const path =
/tests/A/A.test.js-snapshots/A-1-${project}-win32.png
await expect(page).toHaveScreenshot(path)
Motivation
This creates an unnecessary files to review for these screenshots which are identical.
The text was updated successfully, but these errors were encountered: