While building my tests, I've come up against an issue for which I can't find a solution. Simply put, I want to remove the "Selects any" option from the Semantic UI Dropdown which I've previously added. I've tried several approaches unsuccessfully to fireEvent.click
on the little "X" that appears beside the text but none work. Might anyone have any suggestions?
Did you try accessing to the i
tag getting the label of your element? Something like:
fireEvent.click(screen.getByText(/Selects any/).querySelector('i'));
react-testing-library queries return DOM nodes.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.