I'm facing an issue where my test fails to find an element by text after I added the Select UI component from gluestack-ui to my React Native component. Before adding the Select, my test works fine.
open file components/JamSessionsBanner/JamSessionsBanner.tsx
comment or remove Select component (ligne 88 to 104)
npm run test
see test working
gluestack-ui Version
2
Platform
[X] Expo
[ ] React Native CLI
[ ] Next
[X] Web
[ ] Android
[ ] iOS
Other Platform
No response
Additional Information
What I’ve tried:
Ensured that @testing-library/react-native is configured correctly and that the custom render includes the necessary context providers.
I've tried to add waitFor in my test.
The issue seems to arise only after adding the Select component. Without it, everything works as expected.
I've checked the Select rendering and functionality in the app, and it works correctly when manually tested and when render with storybook.
Does anyone know why @testing-library/react-native might not be able to find the text after adding Select?
If you have any insights into why adding Select could cause this issue, or if I'm missing something in the testing setup, I’d appreciate the help!
Description
I'm facing an issue where my test fails to find an element by text after I added the Select UI component from gluestack-ui to my React Native component. Before adding the Select, my test works fine.
CodeSandbox/Snack link
https://gitlab.com/Loann/jam-sessions-frontend.git
Steps to reproduce
gluestack-ui Version
2
Platform
Other Platform
No response
Additional Information
What I’ve tried:
Does anyone know why @testing-library/react-native might not be able to find the text after adding Select?
If you have any insights into why adding Select could cause this issue, or if I'm missing something in the testing setup, I’d appreciate the help!