Open
Description
Current behavior
Please note that the scrollTop
value logged in the console from the video may not always be 0. In my first test, I executed scrollIntoView
, and in the second test, I logged the scrollTop
value. However, I observed that it isn't always 0, even though the second test merely mounted the component without any other actions.
2025-02-22.12.14.14.mov
Desired behavior
Both tests should have scrollTop
set to 0 initially.
Test code to reproduce
https://github.com/zero-one-code/cypress-demo.git
- Open the project and run:
pnpm i
pnpm test
-
In the
scrollTop
test, refresh the page multiple times. -
Observe that the second test's
scrollTop
sometimes incorrectly retains the value from the first test.
Cypress Version
v14.0.3
Node version
v18.20.4
Operating System
macOS 15.3.1
Debug Logs
No response
Other
No response