Open crisfcodes opened 3 years ago
Hey @crisfcodes. A set of tests for this component written with react-native-testing-library can be found directly in our repo. Can it be helpful?
I'm having the same issue in several instances of a project.
I see you're passing correctly the props to your subcomponents down to the TouchabeOpacity
on which the Select relies on. I'm not sure if this is more a problem of the TouchableOpacity itself.
Anyway, the suggested test used is now deprecated as the getByType
function was removed here , so it's not an option for newer projects like the one I'm using and I can't find another way around
If there's an issue with the Select component itself I can send a PR myself to fix the problem if needed, but I'm not sure where the testID
is getting lost. Can anyone please confirm?
I am having the same problem. testID
is not getting correctly set to Select component.
💬 Question
What I want is to press a select component and select an especific option, so I'm having some problems:
If I try to use getByTestId, console trown an error because
testID
prop doesn't apply for Select component, and testing-library can't found the element.I can't use fireEvent over a text element rendered by Select because an error is thrown:
Unable to find node on an unmounted component.
What I'm trying is this:
UI Kitten and Eva version