cypress-plugin-snapshots
cypress-plugin-snapshots copied to clipboard
Snapshot fails when runing `cypress run --spec filePath` but works on Cypress app
Describe the bug
When I run the tests on the Cypress app (cypress open) each spec individually, it works as expected. But, I'm setting up now a way to run the tests as a package.json script using the cypress run --spec ${filePath} as in the README it says I can't run All specs at the same time. But it keeps failing even when I run a single spec file in the command line
To Reproduce Steps to reproduce the behavior:
- Create test with snapshot
- Test it in Cypress app, it should work
- Run single test file with
cypress run --spec "cypress/integration/my_spec.spec.ts"
Expected behavior Test should work
Desktop (please complete the following information):
- OS: Max OS X
- TypeScript 3.8.3
- "cypress-plugin-snapshots": "^1.4.3", "cypress": "^4.5.0".
Image snapshot or text snapshot?
I have had issues with image snapshot as well. Seems the rendering is not exactly the same, did you compare the actual and the expected?
What does actually happen?
in my case the image resolution is different
On left: Actual
On right: Test case
