Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Inconsistent snapshot directory for cypress run vs. cypress open #17

Closed
cangoektas opened this issue Jul 19, 2018 · 3 comments
Closed

Comments

@cangoektas
Copy link

Hi!

I found out that snapshots are saved in different directories depending on if they are created using cypress run or cypress open.

Steps to reproduce

  1. Delete the examples/snapshot directory
  2. Run cypress run
  3. Run crypress open and click on Run all specs

What happens is that the same call to matchImageSnapshot produces two different snapshot files:

screen shot 2018-07-19 at 17 37 38

I stumbled open this because I made a change and expected the tests to fail but since there was a new file created everything was still green. I would expect that the previous snapshot should have been used to match against the new screenshot.

Is there something we can do here?

@jackjocross
Copy link
Collaborator

I've noticed this behavior as well and it's not ideal. I think it's caused by cypress-io/cypress#2091 since we just mirror the screenshots directory in snapshots.

It looks like a fix for the issue is targeting Cypress v3.0.3 though so hopefully that is released soon.

@jackjocross
Copy link
Collaborator

Just noticed that 3.0.3 was released and this issue was fixed 🎉.

@cangoektas
Copy link
Author

Wow, nice! Thanks for the heads-up! 👊

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants