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

Can't find documentation on reporting configuration

Open helenou opened this issue 2 years ago • 3 comments

I'm a new user. I don't see any report once the screenshots are generated including a diff. The directory cypress-visual-report is created along with cypress-visual-screenshot structure that includes baseline, comparison and diff properly. However I have a diff screenshot generated, cypress-visual-report is left empty.

Could you advise and document that feature as I can read it was merged previously (reporting) ?

--> version 1.20.0

Thanks in advance for your kind reply

helenou avatar Jul 28 '22 09:07 helenou

Hello, you can find documentation for reporting here:

https://github.com/uktrade/cypress-image-diff/blob/main/docs/Reporting.md

can you please share the test result + report it generated and I will have a look.

PippoRaimondi avatar Jul 29 '22 11:07 PippoRaimondi

thanks for your reply. I see comments about the threshold being different than set (I set to 0 by default) when using the retry options as follow:

const retryOptions = { limit: 5, // max number of retries delay: 4000 // delay before next iteration, ms };

cy.compareSnapshot('home-page', 0, retryOptions);

Hello, you can find documentation for reporting here:

https://github.com/uktrade/cypress-image-diff/blob/main/docs/Reporting.md

can you please share the test result + report it generated and I will have a look.

helenou avatar Jul 29 '22 13:07 helenou

@PippoRaimondi sorry I cannot share the screenshots but so far from the report (i was missing the report config in after() ) now I see a clear difference in screenshots size where the baseLine is clearly shorter height than comparison.

Can you explain how to decide above 0 threshold please ?

// EDIT: I have cleared the baseline images and now size is similar so I get a full green report, no image displayed it doesn't find difference.

helenou avatar Jul 29 '22 13:07 helenou

when there is no difference, image is not displayed on the report... seems like the main usage of showing images in the report is when there are failures...

PippoRaimondi avatar Dec 12 '22 14:12 PippoRaimondi