-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Never fully hiding in Jest tests in uncontrolled mode #351
Comments
Is this with |
Yes, the installed
|
So this is the type of test case I made to ensure it worked with the latest version: https://codesandbox.io/s/tippy-rtl-unmount-issue-forked-xci2lt?file=/src/tippy.test.js (it passes). |
Sorry for the misunderstanding: I agree, the test works in controlled mode ie. when using the |
Oh ok, the previous issue was about controlled mode and said uncontrolled was fine but now it's the opposite? 😓 or maybe there was also this problem before too |
The tests from my codesandbox fail with |
Similar to this issue, the Tippy component never unmount with jest + react-testing-library in uncontrolled mode ie. when not using the visible property and using methods like userEvent.unhover, fireEvent.mouseLeave or fireEvent.mouseOut. Setting
animation={false}
does not fix the issue.It throws the error
Timed out in waitForElementToBeRemoved
as the Tippy component still is in the DOM oras onHide isn't called.
Here is a codesandbox reproducing the issue:
https://codesandbox.io/s/tippy-rtl-unmount-issue-dowpzt?file=/src/tippy.test.js
It seems to be a tested case in vanilla tippy.js
@tippy-js/react version 4.2.6
The text was updated successfully, but these errors were encountered: