different screen shots for the same test
See original GitHub issueI run the same exact test multiple time, which basically opens up a static page and compares screens each time the screen shot is slightly different as if its ignoring the capture setting or the resolution, i tried viewport and full screen, what else am I missing?
cy.visit(/kits/1233
)
cy.wait(900)
cy.document().toMatchImageSnapshot({ name: 1233
})
this is my “env”: { “cypress-plugin-snapshots”: { “autoCleanUp”: true, “autopassNewSnapshots”: true, “excludeFields”: [], “imageConfig”: { “createDiffImage”: true, “resizeDevicePixelRatio”: true, “threshold”: 0.01, “thresholdType”: “pixel” }, “screenshotConfig”: { “blackout”: [], “capture”: “viewport”, “clip”: null, “disableTimersAndAnimations”: true, “log”: true, “scale”: false, “timeout”: 30000, “log”: true } } }
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Check your cypress run parameters like browser - it sounds like you’re running chrome and electron. Also for applying viewport sizes I added to cypress/plugins/index.js
It is from some not shallow cypress documentation
Forcing chrome to a particular size with the fix above to cypress/plugins/index.js worked for me. It appears that chrome was running at a slightly different window size with cypress run vs. with cypress open. Using this to force the same size on both fixed it for me.