-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Playwright tests fail when choosing option in select beyond initial viewport #7516
Comments
Probably need to scroll to the select before opening it? |
I believe Playwright handles it. The test was working as expected with RAC v1.4.1 and below so I had presumed a regression somewhere was to blame rather than anything to do with Playwright itself |
I have cherry-picked the commits in the release to try and narrow down the cause and it seems as though the issue was introduced as a result of the changes to |
Awesome, thank you for doing that. It's super helpful. If you don't have time, don't worry. I'm just outlining what I would do for whoever comes along next. |
Changing this
I am not entirely clear yet as to why that is the case... |
I think I can see the problem. There's a condition in react-spectrum/packages/@react-aria/overlays/src/useCloseOnScroll.ts Lines 34 to 36 in 326f481
|
If I were to submit a PR for this, is there a particular approach to fixing it that you'd like me to take? |
I think it'd make the most sense to change the types on Then go back and change I'm not sure why TS didn't mark it as dead code. The other option would be to remove that check entirely. It doesn't fail anything to do that, but I don't know what other implications there are, so it'd need to be tested in storybook. Specifically on an iPad according to that commit/PR. |
I have same behaviour. We have upgraded "react-aria-components": "1.4.1" to ver "1.5.0" and playwright tests became flaky. I have noticed that when I have dropdown component open for selection Playwright do the scroll to find an option and it causes the dropdown to close. |
Provide a general summary of the issue here
We've encountered an issue after upgrading from v1.4.1 of the library whereby Playwright tests that try to open a select component found below the fold and choose an option will fail
🤔 Expected Behavior?
The test should pass successfully
😯 Current Behavior
The test times out whilst trying to locate the option
💁 Possible Solution
No response
🔦 Context
No response
🖥️ Steps to Reproduce
https://github.com/jabrks/react-aria-reproduction
There's a GitHub action that runs on the main branch in the repo that demonstrates the test failure, or you can clone the code and run the tests locally yourself with
npm test
Version
react-aria-components 1.5.0
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
macOS
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
The text was updated successfully, but these errors were encountered: