jaredpalmer / cypress-image-snapshot

Catch visual regressions in Cypress
MIT License
890 stars 159 forks source link

Blackout parameter not working when combined with filename #262

Open davidg1975 opened 1 year ago

davidg1975 commented 1 year ago

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