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

Auto Scrolling no longer works after some time #22199

Closed
edvitor13 opened this issue Jun 8, 2022 · 8 comments · Fixed by #23053
Closed

Auto Scrolling no longer works after some time #22199

edvitor13 opened this issue Jun 8, 2022 · 8 comments · Fixed by #23053
Labels
Reproducible Can be reproduced type: regression A bug that didn't appear until a specific Cy version release

Comments

@edvitor13
Copy link

Current behavior

In run mode and with the browser hidden.

After upgrading to Cypress >= 10, in large tests, Auto Scrolling stops working at some point.

Before:

video.2.mp4

After:

video.1.mp4

Desired behavior

No response

Test code to reproduce

npx cypress run

Cypress Version

10.0.3

Other

No response

@lucasdonato
Copy link

same error here

@cypress-bot cypress-bot bot added the stage: investigating Someone from Cypress is looking into this label Jun 8, 2022
@AtofStryker
Copy link
Contributor

Hey @edvitor13. Thank you for filing an issue! I was also able to reproduce the issue by running one of the @package/driver tests within the develop (SHA 72e6b88) branch, specifically click.cy.js. I am going to document the steps I took below for whoever ultimately works on this bug.

Steps to Reproduce

  • after cloning the cypress repository, running yarn to install monorepo dependencies
  • in root directory of repository, run yarn workspace @packages/driver cypress:open
  • Select E2E Testing
  • Start E2E Testing in Chrome (my version installed is v102)
  • search and select click.cy.js
  • watch test run. eventually auto scrolling stops
  • window dimensions did not seem to matter, but for reproduction:
    • Cypress.$(window).width() yielded 1920
    • Cypress.$(window).height() yielded 857

auto-scroll-reprod

It almost looks like a snapshot is being pinned before the test ends. Not sure if that is related 🤔

@AtofStryker AtofStryker added Reproducible Can be reproduced type: bug type: regression A bug that didn't appear until a specific Cy version release and removed type: bug labels Jun 10, 2022
@cypress-bot cypress-bot bot added stage: routed to e2e-core and removed stage: investigating Someone from Cypress is looking into this labels Jun 10, 2022
@marktnoonan
Copy link
Contributor

Possibly related: #16098

Hopefully helpful: I was thinking we might want to not do this scroll listener in run mode? I commented in the other issue but I don't recall if I actually tested that

    scroller.setContainer(this.refs.container as Element, action('user:scroll:detected', () => {
      if (appState && appState.isRunning) {
        appState.temporarilySetAutoScrolling(false)
      }
    }))

@retroace
Copy link

Any update on this? I am also encountering the same error. I am running in run mode.

What's the usefulness of enabling the scroll listeners in cli mode? Can user even scroll in headless/cli mode?

@marktnoonan
Copy link
Contributor

@retroace in the comments of this draft PR you can find instructions in the comments from cypress-bot on how to install a pre-release version of Cypress that includes the fix I suggested here.

I actually completely forgot that @AtofStryker had a reproduction in this issue. We probably should have marked these as duplicates of each other.

In any case, since I have trouble reproducing this problem on my computer, feel free to install the appropriate pre-release binary of Cypress and let me know if it works for you. The pre-release turns off the ability for the user to disable autoscroll in run mode, so you will need to either watch back a video, or use cypress run --headed to see your tests running in a way that would be fixed by this draft.

@laerteneto
Copy link

Sometimes it happens to me because Cypress turns off the Auto-scrolling option automatically. So, I need to turn it on again, but once again at some point it is turned back to off.

Cypress: 10.4.1
OS: Windows 10
Browser: Chrome 104

image

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Sep 13, 2022

The code for this is done in cypress-io/cypress#23053, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Sep 13, 2022

Released in 10.8.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v10.8.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Sep 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Reproducible Can be reproduced type: regression A bug that didn't appear until a specific Cy version release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants