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
any idea what's going on? This is the first time i've integrated with react-native-testing-library and seeing this issue. Any help will be appreciated.
Hey @abanik0831! The issue you deal with is quite similar to #28 (comment). Please read through it.
What happens: TouchableOpacity is implemented using View in React Native, that's why you see the View in hierarchy. Additionally, the implementation of View is mocked inside react-native Jest preset and unfortunately this mock is not complete and doesn't include the logic to disable onPress when disabled is passed to Touchable*.
Since this is common pain point, we may introduce a special handling for some elements, like Touchables, to mitigate that. Ideally I'd like to fix the mock in react-native preset which is the correct solution to the problem.
Versions
react: 16.8.6
react-native: 0.59.4
react-native-testing-library: 1.7.0
react-test-renderer: 16.8.6
Description
debug, snapshot not returning
<TouchableOpacity>
.Sample test written:
Expected output
Output returned:
Reproducible Demo
run the following test:
The text was updated successfully, but these errors were encountered: