Upgrading to v1.7.5+ breaks tests for Combobox and Listbox components #2148
Unanswered
grantiverson
asked this question in
Help
Replies: 0 comments
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.
-
Upgrading to v1.7.5+ breaks my tests for Combobox and Listbox. There seems to be an issue with how "hover" events are triggered by tests. Everything seems to work fine in the browser.
I am using the v1.7.4 of the Combobox and Listbox components to make a dropdown. I am also using the Option components to create options for my dropdown. When an option is hovered,
active
should be set totrue
and conditionally add a class. My component logic looks something like this. The Listbox is similar.I am using React Testing Library to make sure that the "active" class is added when the option is hovered. My test looks like this:
What I’m expecting to happen is something like this:
active = true
propcombo-box__option--active
classHowever, on v1.7.5 the
active
prop is never set totrue
.Beta Was this translation helpful? Give feedback.
All reactions