Open jjt opened 5 years ago
contents of the cypress/
dir after the second test run:
~/p/c/cypress ❯❯❯ tree
.
├── fixtures
│ └── example.json
├── integration
│ ├── __image_snapshots__
│ │ └── Test\ \ does\ more\ than\ one\ snapshot\ #0.png
│ └── test-regression.spec.js
├── plugins
│ └── index.js
├── screenshots
│ └── test-regression.spec.js
└── support
├── commands.js
└── index.js
@jjt Can you retry with latest version and let me know if that fixes it?
tried with 1.2.8 and @9eafd96 and still the same behaviour
wiped yarn.lock, node_modules, reinstalled
nuked the cypress/screenshots
and cypress/integration/__image_snapshots__
dirs between trials too (stopped cypress, deleted those dirs, ran the test, changed element, ran test again) - still showing the old screenshot but with new DOM as per my images above
Thanks for retesting. Will look into it.
Repro case here: https://github.com/jjt/cypress-plugin-snapshots-test
It seems like it only ever takes an initial snapshot and doesn't recapture it. For example, here's after the second run after some changes, where you can see that the contents of the snapshot is a red square with the words HELLO THERE, and the contents of the DOM on the second run is a green square with the text oh hi