simonsmith / cypress-image-snapshot

Catch visual regressions in Cypress with jest-image-snapshot
MIT License
64 stars 15 forks source link

When I have option retries in cypress config files with "attempt" in file name will be generated #19

Closed ISp1rit closed 1 year ago

ISp1rit commented 1 year ago

I've added in cypress.config.ts

retries: {
  runMode: 2,
},

And now when tests are running, if the first attempt failed, then will be generated a new snapshot with a name like: web-client-app/cypress/snapshots/upload-financial-statements-page/provider/provider_statements_page.cy.ts/page-loaded-laptop-1280x720 (attempt 2).snap.png

This file tries to find a diff with a file with the same name, but a file with this name not exists, that's why no error will be thrown and a new snapshot with "attempt 2" in the name will be added.

There is a PR in the original repo https://github.com/jaredpalmer/cypress-image-snapshot/pull/155 that I believe fixes this issue, can you check it please?)

simonsmith commented 1 year ago

Good spot, looks like a regression I created here - https://github.com/simonsmith/cypress-image-snapshot/commit/ef49519795daf5183f4fac6f3136e194f20f39f4

I'll get a fix out

simonsmith commented 1 year ago

:tada: This issue has been resolved in version 8.1.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: