Skip to content
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

Enhancement: "cypress open" should allow overriding baseline screenshot automatically #74

Closed
jehon opened this issue Mar 30, 2021 · 3 comments

Comments

@jehon
Copy link

jehon commented Mar 30, 2021

When I open the cypress, I am making up my tests, modifying the app to be more testable, etc... But the screenshot comparison fail "each time" (hum, yes, a bit of exaggeration here) a make a modification. So actually, I do an "rm -fr .../baseline" before each test, but that's not very top.

I would like to have a mode where Cypress-visual-regression would automatically erase screenshots. I anyway do the comparison when comiting the images in git, so I even don't look at the result at that time.

I had a look at "--env type=base", but it does not seems to work in "cypress open" mode

@jehon jehon changed the title Enhancement: "cypress open" should allow overriding baseline screenshot Enhancement: "cypress open" should allow overriding baseline screenshot automatically Mar 30, 2021
@mjhea0
Copy link
Collaborator

mjhea0 commented Jun 22, 2021

This sounds good. Would you like to open a PR?

@Krismix1
Copy link

Krismix1 commented Jul 8, 2021

I have stumbled upon this feature request, and I want to point out that it might not be currently possible due to this external dependency: cypress-io/cypress#15077. The issue is still present in Cypress 7.6.0.
In short, when running all tests in Cypress GUI mode, the name of the test spec file, and thus the name of the folder where base snapshots are stored will not match with the actual test spec file names, e.g. it will be cypress/snapshots/base/All Integration Specs/*.png instead of cypress/snapshots/base/example.spec.js/*.png.

@mjhea0
Copy link
Collaborator

mjhea0 commented Feb 26, 2022

Closing due to inactivity...

@mjhea0 mjhea0 closed this as completed Feb 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants