Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snapFilenameExtension cause removing of snapshot after test #61

Open
dorley opened this issue Jun 24, 2024 · 2 comments
Open

snapFilenameExtension cause removing of snapshot after test #61

dorley opened this issue Jun 24, 2024 · 2 comments

Comments

@dorley
Copy link

dorley commented Jun 24, 2024

When defining snapFilenameExtension (e.g. to empty string), the snapshot image will be removed after execute method call to 'matchImageSnapshot', if removed 'snapFilenameExtension' then it will work just fine.

Sample code:

addMatchImageSnapshotCommand({
failureThreshold: 0.2,
capture: 'viewport',
// snapFilenameExtension: '',
})

@kamiloski88
Copy link

I use it in the same way, and problem occurs too for me

@simonsmith
Copy link
Owner

simonsmith commented Sep 16, 2024

There is a specific test case to allow snapFilenameExtension to be an empty string, so this should be fine. For that reason I need a more robust reproduction of the issue to make that test fail

https://github.com/simonsmith/cypress-image-snapshot/blob/master/cypress/e2e/matchImageSnapshot.cy.ts#L28-L42

Can you also check #48 and see if that is related?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants