meinaart / cypress-plugin-snapshots

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

update button does not work(bug) #85

Open olaf89 opened 4 years ago

olaf89 commented 4 years ago

Describe the bug When snapshot does not match trying to update it from cypress test runner does not work

To Reproduce Steps to reproduce the behavior: Click update snapshot button

Expected behavior Snapshot is updated

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

meinaart commented 4 years ago

I can't reproduce this, I am also working in OSX. No errors on the command line?

herrmannplatz commented 4 years ago

I ran into a similar problem. While setting up the plugin i added the following properties in cypress config

"env": {
    ...
    "cypress-plugin-snapshots": {
      "imageConfig": {
        "threshold": 0.1,
        "thresholdType": "pixel"
      },
      "serverEnabled": true,
      "serverHost": "localhost",
      "serverPort": 2121,
    }
  },

In this case the websocket connection string is missing the token. When pressing the update button the save snapshot call just fails silently.

Hope that helps.

omelhoro commented 3 years ago

It's not documented anywhere but for me it worked to add token property to the config. No idea why but it's something I found from looking at the code.

      "serverEnabled": true,
      "serverHost": "localhost",
      "serverPort": 2121,
      "token": "1234"