cypress-match-screenshot
cypress-match-screenshot copied to clipboard
use latest `cy.screenshot()`
Hey, nice work here! 👍
FYI, cy.screenshot()
has been rewritten from the ground up in the 3.0.0
version of cypress which eliminates the need for sophisticated cropping code here. Check it out:
https://docs.cypress.io/guides/references/changelog.html#3-0-0
Hey, that's great 👏 Will definitely have a look over the weekend and see how much I can simplify things with this :+1:
just as a heads up: in 3.0.2, the file structure of saved screenshots changed, so cypress-match-screenshot is currently broken in the newest versions of cypress. (documentation is in the progres of being updated, see https://github.com/cypress-io/cypress/issues/2084 ) also, be aware of this bug if you want to implement the new behaviour: https://github.com/cypress-io/cypress/issues/2091
yeah, sorry, I'm a bit busy atm, so I didn't get to have a look at this yet, but will definitely do as soon as I can :blush:
no worries, just wanted to spare you some frustration when you get around to it ;)
hey, I finally got to spend some time on this :smile:
I removed the cropping logic and adjusted the diffing functionality, so that the plugin works again with the latest cypress version (v3.0.2) ... check out v1.0.0
and let me know if there are still any issues :+1: (I don't know if its a breaking change tbh, I just treated it as one to be save 😅)
That being said, the new screenshot functionality in cypress seems to be a bit iffy still. When changing the window size of the test runner, cypress doesn't scale the app window to the defined dimensions, which means diffing will fail ... this was part of the cropping logic that I had in place previously (which was also very fragile), so I'll have to think about how to work around this.
@julianburr nice! Thanks for your work!
When changing the window size of the test runner, cypress doesn't scale the app window to the defined dimensions, which means diffing will fail
Maybe it makes sense to open an issue in the cypress repo?
cypress gives error unresolved function or method , how can i solve the issue has I have followed all the instructions in usage documentation, thanks in advance