meinaart / cypress-plugin-snapshots

Plugin for snapshot tests in Cypress.io
MIT License
489 stars 116 forks source link

(bug) Display snapshot error when click compare snapshot button first time #145

Closed candy-Tong closed 3 years ago

candy-Tong commented 3 years ago

Describe the bug The test have a image snapshot error. I click the compare snapshot button. Two image it display are the diff. image And i close the modal, and compare again. It display right.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior When click the compare snapshot, it dispplay the exprected result and Actual result.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

taninnazar commented 3 years ago

@meinaart Hello, I have the same issue. I guess it's Windows-related error. Would be nice to fix that

Norfeldt commented 3 years ago

@taninnazar I'm using macOS and having the same issue

$ yarn cypress version
yarn run v1.22.5
$ /<path to repo>/<repo>/node_modules/.bin/cypress version
Cypress package version: 5.6.0
Cypress binary version: 5.6.0

package.json

"devDependencies": {
   ...
   "cypress-plugin-snapshots": "^1.4.4",
   ...
}
vio-codes commented 3 years ago

@taninnazar I have the same issue on macOS, basically for imageSnapshot when I click for the first time the actual and the expected image are the same. Clicking again on the button does the trick and than it works just fine.