Skip to content

Failing tests don't fail if you retry them. #156

@VicJer

Description

@VicJer

I have came across an issue hopefully someone can enlighten me. My test is pretty much an one liner and uses the settings from the docs and it works great but when combined with the cypress setting for automatic retries eg retries:{runMode:2} it fails on the first try then any consecutive retry passes. I narrowed it down to the fact that snapshot name changes and the test generates a new one on each retry with (attempt X) in the name. I am assuming the comparison method picks up that new screenshot instead of the one it already has. My workaround was to create multiple copies of the screenshot with appropriate attempt suffix but it feels not right.

as regards the test it literally is cy.get('#viewer').matchImageSnapshot( 'testSnapshot', options) and options are

{
    comparisonMethod: 'ssim',
    failureThreshold: 0.1,
    failureThresholdType: 'percent',
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions