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
Describe the bug
While using the examples from this package test working fine, using <button ref={setTriggerRef}>text</button>
When testing the same code, but adding a span (or any other element) around the text (<button ref={setTriggerRef}><span>text</span></button>) the hover event isn't working. (logging the visible state stays false)
To Reproduce
Steps to reproduce the behavior:
Use the same test setup from /test folder in this package
wrap the trigger text with span tag.
Expected behavior
Expected hover inside nested child to work as well.
Desktop (please complete the following information):
Mac with VSCode and zsh terminal
@testing-library/react
@testing-library/user-event
Jest.
Additional context
This scenario still working on the app itself, the hover toggles the "visible" status to true.
If you change the trigger to click, the test is working.
I'm assume it's something to do with onMouseEnter isn't bubbling.
Thanks!
The text was updated successfully, but these errors were encountered:
Hi @tomfridental1 , any update with a possibility to use useEvent.hover from @testing-library/user-event ?
(and thank again for your answer with fireEvent ^^)
Describe the bug
While using the examples from this package test working fine, using
<button ref={setTriggerRef}>text</button>
When testing the same code, but adding a span (or any other element) around the text (
<button ref={setTriggerRef}><span>text</span></button>
) the hover event isn't working. (logging the visible state stays false)To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expected hover inside nested child to work as well.
Desktop (please complete the following information):
Mac with VSCode and zsh terminal
@testing-library/react
@testing-library/user-event
Jest.
Additional context
This scenario still working on the app itself, the hover toggles the "visible" status to true.
If you change the trigger to click, the test is working.
I'm assume it's something to do with onMouseEnter isn't bubbling.
Thanks!
The text was updated successfully, but these errors were encountered: