meinaart / cypress-plugin-snapshots

Plugin for snapshot tests in Cypress.io
MIT License
498 stars 117 forks source link

(bug) Cypress-image-snapshot makes the cut image #201

Open cosminmois opened 3 years ago

cosminmois commented 3 years ago

Describe the bug I want to snapshot an element from the page. When I run the script with the command “npx cypress open” and select the script which I want to run, the image of the element is whole, but when I run the script with the command “npm run cy: dashboard” (It’s the command which runs all the scripts on the dashboard), the image is cut.

To Reproduce

Steps to reproduce the behavior: For the “npx cypress open” command:

  1. Run npx cypress open
  2. Click a spec file
  3. See the image For the “npm run cy:dashboard”:
  4. Run npm run cy:dashboard
  5. See the image

Actual result For the “npx cypress open” command:

Expected result The images from those two runs should be whole.

The whole image:

whole_image

The cut image:

cut_image