skip to Main Content

React native – Cannot Find TestID for react-native Unit test cases, following is the description for the same

Test Case: it("Test Email text by test id" , () => { const testIDName='email-title'; const {getByTestId} = render( <Provider store={store}> <NavigationContainer><Login /></NavigationContainer> </Provider>); const foundID=getByTestId(testIDName); expect(foundID).toBeDefined(); }) Element Structure: <Text testID= {'email-title'} style={styles.emailText}>Email</Text> Error Being Thrown: Unable to find an…

VIEW QUESTION
Back To Top
Search