-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Provide a general summary of the issue here
Hello,
I'm using tooltip from @nextui-org/react that uses @react-aria/tooltip internally (specifically useTooltipTrigger).
While trying to verify that tooltip opens in my tests (using playwright) I stumbled upon tooltip not getting opened on hover while testing.
The diff that is happening is that the tooltip state always has prop open: false and never shows up in playwright's browser.
It is happening because of the useTooltipTriggers onHoverStart function that checks interactionModality and doesn't open tooltip if it's not pointer.
Real browser sets interactionModality to pointer whenever hover is happening on a document, but testing software doesn't happen to do that.
When I add additional clicking in the browser before first hover - it works as intended.
🤔 Expected Behavior?
I expect playwright's browser hover make tooltip open - without additional clicking.
😯 Current Behavior
Tooltip is not opened if no click (move?) was made before in playwright.
💁 Possible Solution
No response
🔦 Context
No response
🖥️ Steps to Reproduce
- Add a tooltip on a page
- (in playwright test) Hover the tooltip
- (in playwright test) Verify tooltip exists
Version
3.20.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