You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering an issue when trying to locate a View/Button inside BottomSheetFooter using testID in a React Native testing environment. The test consistently fails with the following error: Error: Unable to find an element with testID: footer-button
It fails as well with the default template - modal body found, but footer - no:
Reproduction steps
clone repo
run yarn
run yarn test
or:
Render a BaseBottomSheetModal that includes BottomSheetFooter with a View containing testID="footer-button".
Use getByTestId("footer") in a test to locate the element.
Result: The test fails, stating that the element cannot be found.
Expected: The test should be able to locate the View inside BottomSheetFooter using testID="footer".
Error: Unable to find an element with testID: footer-button
<View><View><View
accessible={true}
><Text>
Open sheet
</Text></View><RCTScrollView
testID="scroll-view"><View><View><Text>
Awesome 🎉
</Text><Text>
Awesome 🎉
</Text><Text>
Awesome 🎉
</Text><Text>
Awesome 🎉
</Text><Text>
Awesome 🎉
</Text></View></View></RCTScrollView></View></View>
at Object.getByTestId (/Users/arriadnie/Documents/projects/FDV/testing/MyApp/__tests__/App.test.tsx:32:12)
at Promise.then.completed (/Users/arriadnie/Documents/projects/FDV/testing/MyApp/node_modules/jest-circus/build/utils.js:298:28)
at new Promise (<anonymous>)
at callAsyncCircusFn (/Users/arriadnie/Documents/projects/FDV/testing/MyApp/node_modules/jest-circus/build/utils.js:231:10)
at _callCircusTest (/Users/arriadnie/Documents/projects/FDV/testing/MyApp/node_modules/jest-circus/build/run.js:316:40)
at _runTest (/Users/arriadnie/Documents/projects/FDV/testing/MyApp/node_modules/jest-circus/build/run.js:252:3)
at _runTestsForDescribeBlock (/Users/arriadnie/Documents/projects/FDV/testing/MyApp/node_modules/jest-circus/build/run.js:126:9)
at _runTestsForDescribeBlock (/Users/arriadnie/Documents/projects/FDV/testing/MyApp/node_modules/jest-circus/build/run.js:121:9)
at run (/Users/arriadnie/Documents/projects/FDV/testing/MyApp/node_modules/jest-circus/build/run.js:71:3)
at runAndTransformResultsToJestFormat (/Users/arriadnie/Documents/projects/FDV/testing/MyApp/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
at jestAdapter (/Users/arriadnie/Documents/projects/FDV/testing/MyApp/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
at runTestInternal (/Users/arriadnie/Documents/projects/FDV/testing/MyApp/node_modules/jest-runner/build/runTest.js:367:16)
at runTest (/Users/arriadnie/Documents/projects/FDV/testing/MyApp/node_modules/jest-runner/build/runTest.js:444:34)
at Object.worker (/Users/arriadnie/Documents/projects/FDV/testing/MyApp/node_modules/jest-runner/build/testWorker.js:106:12)
The text was updated successfully, but these errors were encountered:
Version
v5
Reanimated Version
v3
Gesture Handler Version
v2
Platforms
iOS, Android
What happened?
I'm encountering an issue when trying to locate a View/Button inside BottomSheetFooter using testID in a React Native testing environment. The test consistently fails with the following error:
Error: Unable to find an element with testID: footer-button
It fails as well with the default template - modal body found, but footer - no:
![Image](https://private-user-images.githubusercontent.com/109542585/408201317-1ababa5b-da11-4d65-810a-f85d8044448a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NDMyNzEsIm5iZiI6MTczODk0Mjk3MSwicGF0aCI6Ii8xMDk1NDI1ODUvNDA4MjAxMzE3LTFhYmFiYTViLWRhMTEtNGQ2NS04MTBhLWY4NWQ4MDQ0NDQ4YS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwN1QxNTQyNTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jYzIyM2IwYmVhMWZkOGQ4ZjI2ZjM0ZGE0YzZmZDFkZGY1NjI3MzMxZjJmNDY5Y2Y1OTg5YWUxYTgwMmNmMWM0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.EWa_qHsjdTpkhFaUoXMl-LnqW_7-A8jYHYVYtmjenWo)
Reproduction steps
or:
Result: The test fails, stating that the element cannot be found.
Expected: The test should be able to locate the View inside BottomSheetFooter using testID="footer".
Reproduction sample
https://github.com/LCseniordev/BottomsheetFooterTesting
Relevant log output
The text was updated successfully, but these errors were encountered: