Replies: 1 comment 1 reply
-
I think you'll find this useful https://react-spectrum.adobe.com/react-aria/Select.html#testing Note, you said you used Select, so these are the select docs. However, if you really meant the role=combobox, then you should be using the ComboBox component, not the Select, and you should use the test utils on that page. You can have a look at the source and our own tests for how we target certain components as well. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have implemented a styled select component based on the React Aria select. Then, I replaced my old implementation with the new one, and it broke all my tests, because testing-library cannot find the component by the usual
combobox
role. And I cannot find a working alternativeHere is an example of the HTML markup available to Jest:
I cannot find any way to look it up. Could you point me in the right direction here?
My tests do something like:
Beta Was this translation helpful? Give feedback.
All reactions