cypress-plugin-snapshots icon indicating copy to clipboard operation
cypress-plugin-snapshots copied to clipboard

Snapshot fails when runing `cypress run --spec filePath` but works on Cypress app

Open nigellima opened this issue 5 years ago • 2 comments

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:

  1. Create test with snapshot
  2. Test it in Cypress app, it should work
  3. 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".

nigellima avatar Jul 13 '20 16:07 nigellima

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?

meinaart avatar Aug 13 '20 08:08 meinaart

in my case the image resolution is different On left: Actual On right: Test case image

FDiskas avatar Sep 15 '20 08:09 FDiskas