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

snapshot image is cutoff #134

Open
ypatel26 opened this issue May 19, 2020 · 5 comments
Open

snapshot image is cutoff #134

ypatel26 opened this issue May 19, 2020 · 5 comments

Comments

@ypatel26
Copy link

why is the the snapshot image get's cut off. only capturing the half of the image.

@MattTreichelYeah
Copy link

I'm getting an issue like this as well actually, full-page screenshots are inconsistently captured mid-paint. One of them even had the Cypress UI present in the bottom half of the render and marked that as a diff, which seems uh, very questionable.

I may be able to wait for elements to be on-screen but I wonder if something can be done to mitigate this? It doesn't seem like anyone would want screenshots mid-paint.

@timarney
Copy link

timarney commented Jun 5, 2020

Curious if you're getting this type of error

Error: Image size (1872x1256) different than saved snapshot size (936x628).

Example screen - cypress-io/cypress#3324 (comment)

or if you have a different issue.

We do not recommend comparing screenshots across environments (aka comparing screenshots taken in cypress open versus cypress run)

@MattTreichelYeah
Copy link

That's an interesting thread, but not sure if it's the same problem for me. These issues come up during the same Cypress open invocation. I'd include screenshots, but it's workplace stuff.

@Nate-Wessel
Copy link

If it's a screenshot of an element, it could be that it's not fully scrolled into view?

@zuzusik
Copy link

zuzusik commented May 25, 2022

We have faced similar issue recently. What helped us is to set browser viewport to be equal to Xvfb screen size used for running headless Cypress:

cy.viewport(1280, 720);

We have also tried to scroll element into view, and to scroll parent container of the element - it would not help - it just produced screenshots cut even in a more bizarre way

This is probably some issue with Cypress - I will try to reproduce on simple example and report to them

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