cypress-image-snapshot icon indicating copy to clipboard operation
cypress-image-snapshot copied to clipboard

Always output difference percentage vs failureThreshold

Open jsphstls opened this issue 4 years ago • 1 comments

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.

jsphstls avatar May 13 '20 19:05 jsphstls

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

mgrn0 avatar May 25 '21 10:05 mgrn0