-
-
Notifications
You must be signed in to change notification settings - Fork 22
Question about threshold #214
-
How do you change the threshold value so any difference will cause a fail?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 1 reply
-
Hey @SaraCooperQA,
As of version 3.2.11
it is possible to set maxDiffThreshold: 0
in the plugin configuration.
Does this answer your question?
Beta Was this translation helpful? Give feedback.
All reactions
-
Hey @FRSgit. I am running 3.3.10
. This is my test:
it('visual test', () => {
cy.visit('https://example.cypress.io/todo')
cy.wait(2000)
cy.matchImage({
diffConfig: {
maxDiffThreshold: 0,
},
})
})
If I have a tiny diff it says: Image diff factor (0%) is within boundaries of maximum threshold option 0.01 and the test passes. If I have a big diff I get: Image diff factor (0.017%) is bigger than maximum threshold option 0.01. and the test correctly fails. I tried changing the maxDiffThreshold to different values, but it never caught the tiny diff. So I am having the same issue as @SaraCooperQA I believe.
Beta Was this translation helpful? Give feedback.