jaredpalmer / cypress-image-snapshot

Catch visual regressions in Cypress
MIT License
888 stars 160 forks source link

Always output difference percentage vs failureThreshold #132

Open jsphstls opened 4 years ago

jsphstls commented 4 years ago

I am using failureThreshold to allow tests to pass when browser or system differences are causing discrepancies (https://github.com/palmerhq/cypress-image-snapshot/issues/98)

When a test fails, I see: Error: Image was 1.8474242424242424% different from saved snapshot with 12193 different pixels.

If I increase the failureThreshold, the test passes and the difference percent is no longer in the output. The difference percentage should always be logged with the threshold percent that it was compared against. This would allow me to tune the failureThreshold so that it is not too high and potentially allowing unintended differences.

mgrn0 commented 3 years ago

Any updates on how to output the diff percentage? I would need the exact same information..