You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The selectOption method of a test User for the menu ARIA pattern call jest.runAllTimers() when it might not be installed in the test environment (if setup with vitest for example)
🤔 Expected Behavior?
@react-aria/test-utils should work with jest or vitest. I assume that because of the way the test User is setup and can be passed a method for advanceTimer
😯 Current Behavior
Test using the menu ARIA pattern will fail if trying to select an option or open a submenu
💁 Possible Solution
the runAllTimers method could be injected in addition of advanceTimer
🔦 Context
Trying the alpha version of @react-aria/test-utils to replace some homemade utils to interact with react app using RAC components
Thanks for reporting! Looks like we missed adding it as a peer requirement or as a dependency injection.
I think we can try out the dependency injection first and see if that makes sense before locking out others.
@snowystinger I think we should try to replace those jest.runAllTimers calls in the menu utils, they seem to be there to wait for transitions perhaps? If so then we could wait for the menu to disappear/appear accordingly
Provide a general summary of the issue here
The
selectOption
method of a test User for the menu ARIA pattern calljest.runAllTimers()
when it might not be installed in the test environment (if setup with vitest for example)🤔 Expected Behavior?
@react-aria/test-utils should work with jest or vitest. I assume that because of the way the test User is setup and can be passed a method for
advanceTimer
😯 Current Behavior
Test using the menu ARIA pattern will fail if trying to select an option or open a submenu
💁 Possible Solution
the
runAllTimers
method could be injected in addition ofadvanceTimer
🔦 Context
Trying the alpha version of
@react-aria/test-utils
to replace some homemade utils to interact with react app using RAC components🖥️ Steps to Reproduce
Version
@react-aria/test-utils 1.0.0-alpha.4
What browsers are you seeing the problem on?
Other
If other, please specify.
Chromuim from playwright
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: