react-select icon indicating copy to clipboard operation
react-select copied to clipboard

Test react-select cannot trigger selection event

Open gsstar9028 opened this issue 6 years ago • 8 comments

Created a wrapper component (MultiSelect) that essentially returns a ReactSelect from react-select. Using React Testing Library to test it, I could trigger a focus event on the option I am selecting but couldn't trigger a selection.

codesandbox: https://codesandbox.io/s/react-select-test-ni125?file=/src/tests/WrappedSelect.test.js:137-141

gsstar9028 avatar Aug 26 '20 21:08 gsstar9028

Greetings,

I'd be happy to help and work through it. Would you be so kind as to set up a codesandbox with the test cases so that it would be easier to work through?

ebonow avatar Sep 01 '20 16:09 ebonow

added codesandbox link trying to make options show up

gsstar9028 avatar Sep 10 '20 18:09 gsstar9028

+1

sabinasiddiqi avatar Nov 11 '20 22:11 sabinasiddiqi

+1

singleseeker avatar Jan 31 '21 17:01 singleseeker

@ebonow show time~!

singleseeker avatar Feb 09 '21 11:02 singleseeker

That issue is also happening on <Select /> if I am not mistaken. I can assert the dropdown is opened on ArrowDown but can't select an option from it.

GeniaT avatar Feb 18 '21 21:02 GeniaT

Just wanted to follow up.

I have had an opportunity since first replying to this to view and add more tests to the react-select library, but seem to be running into some issues with this implementation for some reason.

There are plenty of examples here: https://github.com/JedWatson/react-select/blob/master/packages/react-select/src/tests/Select.test.js which may help. I'll continue to keep looking at this and trying to figure out why this particular implementation isn't compiling or working with the provided example.

ebonow avatar Mar 11 '21 01:03 ebonow

Marking this as stale for now, please open a pull request if you have a resolution and the problem is on behalf of react-select

dcousens avatar Oct 31 '22 00:10 dcousens