Open nagamejun opened 4 years ago
Try setting env.updateSnapshots
to false
in your cypress.json.
Thank you for your answer. I tried it but it didn't work.
Ensure you aren't deleting your snapshots folder automatically by accident. I had a pre-cypress hook that was cleaning up the snapshots folder, thus the next time my test ran there was nothing to compare against, so it just created the files again.
From looking at the source code cypress-image-snapshot seems to do the following:
This means that actually the snapshot most likely is not updated but the file will still be overwritten with its original content.
I'm running cypress e2e testing and ui snapshotting with cypress-image-snapshot on a web app. Whenever matchImageSnapshot() succeeds, it replaces the existing .png image with a newer one.
I run the following:
a) Even with updateSnapshots set false, images are still updating. Any ideas? b) Updating an image with a newer identical image seems unnecessary. Is this the intended behavior?
Running with:
Similar to this question https://stackoverflow.com/questions/59277412/how-to-stop-updating-ui-snapshots-with-cypress-e2e-snapshot-testing-and-vue