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

component testing: top of iframe sometimes hidden #16788

Closed
lmiller1990 opened this issue Jun 3, 2021 · 10 comments · Fixed by #19646
Closed

component testing: top of iframe sometimes hidden #16788

lmiller1990 opened this issue Jun 3, 2021 · 10 comments · Fixed by #19646
Labels
stage: needs review The PR code is done & tested, needs review

Comments

@lmiller1990
Copy link
Contributor

Current behavior

Sometimes the top of the iframe cannot be seen:

image

Desired behavior

Can see entire iframe.

Test code to reproduce

This branch does it: #16747

Go to packages/springboard and run yarn cypress:open:ct

Versions

@AnanaMJ
Copy link

AnanaMJ commented Jul 22, 2021

If you find the component with class="size-container" and add

position: fixed
right: -300px (ajust to whatever looks good for you)

to the element style, does it fix your issue?

I'm seeing something similar locally but this is the only issue that is close enough to what's happening to me

@lmiller1990
Copy link
Contributor Author

Thanks for the suggestion - I'm more looking for a solution that solves it for everyone out of the box, but it's likely to be something similar to what you are suggesting (some kind of minor CSS adjustment).

@joshwooding
Copy link
Contributor

Any update on a fix/workaround for this?

@elevatebart
Copy link
Contributor

I think @tgriesser made a fix for this that he only committed to 10.0-release.

Tim, would you mind terribly merging your fix into 9.X?

#18649

@joshwooding
Copy link
Contributor

Any update on this? Happy to create a PR with the commit cherry-picked if it helps :)

@elevatebart
Copy link
Contributor

@joshwooding thank you for asking.

No update yet I am afraid. It would really help if you shared a repo where you see the problem and we could test the fix.

@lmiller1990
Copy link
Contributor Author

If you want to make a PR cherry-picking #18649, I think that would be fine. It would be great if we could find out how to consistently reproduce this problem, so we can verify #18649 actually fixes it.

@joshwooding
Copy link
Contributor

joshwooding commented Jan 11, 2022

I'll see if I'm able to reproduce this consistently. I know that when I encounter it I can apply #18649 locally and it fixes it.

@joshwooding
Copy link
Contributor

I was able to reproduce it @lmiller1990 I believe it's something to do with the scrolling of the command pane and setting the viewportHeight to above a certain value. My reproduction is here: https://github.com/joshwooding/cypress-react-template

@elevatebart
Copy link
Contributor

I believe the issue happens, on 9.X, under those conditions:

  • the AUT needs to scale down because the viewport is too big for the browser window user has open
  • the application in the AUT iframe is bigger than the iframe (because of the viewport settings)

In this case, the initial scroll pushes the content above the fold. It does not happen all the time since it is a rendering race condition.
This scrolled content is then made inaccessible by blocking scroll using overflow: hidden.

I believe using overflow: clip instead of overflow:hidden would block this scroll up for good and fix it.

I will review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: needs review The PR code is done & tested, needs review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants