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

Snapshots sometimes captured at smaller size #67

Closed
PTaylour opened this issue Feb 28, 2019 · 12 comments
Closed

Snapshots sometimes captured at smaller size #67

PTaylour opened this issue Feb 28, 2019 · 12 comments

Comments

@PTaylour
Copy link

I'm sometimes seeing failed tests where the snapshots look to be the same, but at different resolutions.

Has anyone else experienced this?

playback at time 0 5 diff

index.html

    <canvas id="canvas" width="1920" height="1080" style="width: 500px;"></canvas>

test.spec.js

// ...  code to render image on canvas. 
cy.get("#canvas").matchImageSnapshot()
@jackjocross
Copy link
Collaborator

I have experienced this issue intermittently when switching between cypress run and cypress open. Were both these screenshots taken in the same mode?

cypress-io/cypress#1309 might also be related.

@PTaylour
Copy link
Author

PTaylour commented Mar 8, 2019

They were taken with the different modes for me too.

I did update snapshots with run

then using run again passed

but using open results in the failure.

Have you tried any workarounds?

@jackjocross
Copy link
Collaborator

I haven't tried this myself, but this seems like a promising workaround: cypress-io/cypress#495 (comment).

@PTaylour
Copy link
Author

That looks great, shall try it out!

@rodoabad
Copy link

rodoabad commented May 8, 2019

This is also happening to me too.

run and open produces different snapshots.

@rodoabad
Copy link

rodoabad commented May 8, 2019

@crosscompile that "workaround" does not work for me. Did it work for you?

@jackjocross
Copy link
Collaborator

@rodoabad I haven't had a chance to try it out yet.

@PTaylour
Copy link
Author

PTaylour commented May 9, 2019

I tried it quickly and it didn't work for me

@stefanoTron
Copy link

Did anyone come up with a solution to solve this? The workaround did not work for me either

@edelgado
Copy link

edelgado commented Jun 5, 2019

This is hugely problematic for us. Can we discard that this is an issue with this plugin though?

@PTaylour
Copy link
Author

PTaylour commented Jun 6, 2019

Yep happy to close in favour of cypress-io/cypress#3324 if this a cypress cy.screenshot issue.

@PTaylour PTaylour closed this as completed Jun 6, 2019
@PTaylour
Copy link
Author

PTaylour commented Jun 6, 2019

This obviously still affects this plugin though. Feel free to re-open if this issue is a useful way to track progress.

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

5 participants