Skip to content
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

Cannot open select panel from jest and react testing library #886

Open
DawnMD opened this issue Dec 7, 2022 · 2 comments
Open

Cannot open select panel from jest and react testing library #886

DawnMD opened this issue Dec 7, 2022 · 2 comments

Comments

@DawnMD
Copy link

DawnMD commented Dec 7, 2022

I'm trying to render a selection input where initially nothing will be selected and on the click of the input it will show all the available values.
image
Select is the Select from the package whereas SelectOption is Option. When rendered via react testing library and clicked on the input, the selection list is not generated but works flawlessly in the UI
image

Form library: Formik

@raDiesle
Copy link

raDiesle commented Oct 24, 2023

same problem.

Actual problem is that all the time the popup container is not there at all in html, before and after open click.
getPopupContainer={(node): HTMLElement => { return node.parentNode; }}

e.g.
<div id="mypopup" />
without any classes attached

@raDiesle
Copy link

This helped me from #563:

await act(async () => {
await fireEvent.mouseDown(screen.getByRole('combobox'));
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants