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

v3.3.0 - screenshot stitching broken #4250

Closed
lukeapage opened this issue May 20, 2019 · 6 comments
Closed

v3.3.0 - screenshot stitching broken #4250

lukeapage opened this issue May 20, 2019 · 6 comments

Comments

@lukeapage
Copy link
Contributor

lukeapage commented May 20, 2019

Current behavior:

Large pages get stitched together nicely by scrolling and stitching together images

Desired behavior:

This continues to work in 3.3.0

Steps to reproduce: (app code and test code)

It looks like its not scrolling the page properly, but taking the screenshots anyway and stitching them.

example:
image

This appears to be happening consistently - I can provide more info and investigation if this isn't immediately reproducible.

Versions

windows, cypress 3.3.0

@jennifer-shehane
Copy link
Member

Hey @lukeapage, thanks for opening an issue.

It's a bit difficult to tell from your issue what the screenshot should look like, since I'm not familiar with your application.

Can you run the same test in 3.2.0 and provide the screenshots alongside the 3.3.0 screenshots? I'm assuming 3.2.0 had the screenshot stitching you wanted.

Knowing all of the changes that went into 3.3.0, I have no idea what would have affected this screenshot process.

@jennifer-shehane jennifer-shehane added the stage: needs information Not enough info to reproduce the issue label May 20, 2019
@jennifer-shehane
Copy link
Member

Also, do you have any code or plugins in your application that affect scrolling behavior? Smooth scroll? Similar?

@lukeapage
Copy link
Contributor Author

Here is the 3.2.0 screenshot.

image

and now I've noticed that in 3.2.0 it is (for our app) not stitching together the app.

So
3.2.0 - not stitching
3.3.0 - trying to stitch but failing

@lukeapage
Copy link
Contributor Author

We have no scrolling plugins, but as per other related issues I've found we may have particular css that is somehow breaking it.

I'll have a debug later.. I raised this thinking it was an obvious regression but now I see its not as clear as that.

@jennifer-shehane
Copy link
Member

This fix in 3.3.0 was slightly related to screenshot timing #3069 But yeah, 3.3.0 is also running in Chrome 61 versus Chrome 59, which may have some unintended change.

@lukeapage
Copy link
Contributor Author

@jennifer-shehane this line..

docHeight = $(doc).height()

Now returns a height thats bigger than the body height (which is set to viewport)

We have a structure like this

body
  div
     div - set to viewport height
       div - overflows and gives a scrollbar on the parent div

and it seems document.body.scrollHeight returns 1004, but the viewport is 600.

When I try chrome it does the same thing as electron, so it may actually be a chrome bugfix and electron v59 worked in our favour.

I think we can use capture: 'viewport' to keep the same behaviour, or we can change our dom structure to scroll on body if we want stitching to work.

@jennifer-shehane jennifer-shehane removed the stage: needs information Not enough info to reproduce the issue label May 30, 2019
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

2 participants