-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix: only adjust autoscrolling in interactive mode #23053
Conversation
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
Going to add @emilyrohrbough who has been working on the reporter a lot lately for some additional 👀 |
Updated with @lmiller1990's much better tests 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified scrolling is working as expected in Electron, Chrome, FF, and no issues in headless. Looks good 👍
User facing changelog
In run mode, autoscrolling of the command log can no longer become disabled.
Additional details
In the linked issues several users have reported issues with the command log autoscroll becoming disabled in run mode intermittently, or in some cases every time. This is particularly painful when reviewing the video for a failed test, as without autoscrolling, the error message associated with the failure is not visible. This makes debugging a lot harder.
The underlying cause is that for whatever reason, especially when resources are low, the browser sometimes seems to incorrectly detect user scrolling when elements are rapidly being added to the command log and Cypress is autoscrolling, which triggers the
temporarilySetAutoScrolling(false)
code that is helpful in open mode, since in open mode it's natural for to manually scroll the reporter while tests are running, and autoscroll would contradict that.Since this has no purpose in run mode (or a very narrow one, when running with the
--headed
flag), it seems best to just turn off the scroll handling when we know that any scrolling is not possibly coming from the user.Steps to test
This one is difficult to test manually as we have almost never been able to reproduce it. But users who have tried pre-release binaries implementing the fix report that it works.
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?