Skip to content

Blackout parameter not working when combined with filename #262

@davidg1975

Description

@davidg1975

I am using @simonsmith/cypress-image-snapshot v5.0.5 with Cypress 11.2.0 to test an angular application.

When I use the command:
cy.root().matchImageSnapshot( {blackout: ['.last-synced','.line-2-inner-container'] })

I get the snapshot as below, note the 2 blacked-out areas:
Clean install initial Visual Tests -- Compare clean Dashboard page snap

However, if I add a file name to the command:
cy.root().matchImageSnapshot('myCustomFileName', {blackout: ['.last-synced','.line-2-inner-container'] })

I get an image called (correctly) myCustomFileName.snap.png, but which is missing the blacked out areas:
myCustomFileName snap

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