Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use latest cy.screenshot() #13

Open
RomanHotsiy opened this issue Jun 18, 2018 · 7 comments
Open

use latest cy.screenshot() #13

RomanHotsiy opened this issue Jun 18, 2018 · 7 comments

Comments

@RomanHotsiy
Copy link

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

@julianburr
Copy link
Owner

Hey, that's great 👏 Will definitely have a look over the weekend and see how much I can simplify things with this 👍

@phryneas
Copy link

phryneas commented Jul 3, 2018

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 cypress-io/cypress#2084 )
also, be aware of this bug if you want to implement the new behaviour: cypress-io/cypress#2091

@julianburr
Copy link
Owner

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 😊

@phryneas
Copy link

phryneas commented Jul 4, 2018

no worries, just wanted to spare you some frustration when you get around to it ;)

@julianburr
Copy link
Owner

julianburr commented Jul 15, 2018

hey, I finally got to spend some time on this 😄

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 👍 (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.

@RomanHotsiy
Copy link
Author

@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?

@ola5
Copy link

ola5 commented Sep 17, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants