-
-
Notifications
You must be signed in to change notification settings - Fork 44
fireEvent.press does not work on TouchableOpacity #113
Comments
I had the same issue after upgrading to RN 0.62.
|
Our tests have also broken after upgrading to RN 0.62. I've applied a temporary fix to make the tests pass again by mocking
|
I am experiencing exactly the same thing. |
@halilb Your fix worked for me! |
@halilb Thanks for this solution, however, this fix is not totally working for me since it breaks a lot of other unit tests. 🤕 However, this simple snippet as mentioned here works fine for me :) I hope it would help some mates 😃 ⏬Working solution for me ⏬
|
I'm running into the same issue when trying to the Any pointers on how I'd go about mocking that out? Using the above (but for TouchableWithoutFeedback) doesn't seem to do the trick 🤔 EDIT: Naturally got it working a few minutes after posting...
|
Can confirm the issue. |
I've fixed this in #136 🎉 |
You can now upgrade to version |
react-native
orexpo
: react-nativenative-testing-library
version: 5.0.3jest-preset
: @testing-library/react-nativereact-native
: 0.62.0-rc.3node
version: v12.12.0Relevant code or config:
What you did:
In 0.62.0-rc.3,
fireEvent.press
does not seem to work at all onTouchableOpacity
. Trying on for example aButton
seems to work fine, just notTouchableOpacity
(and presumably similar components).Reproduction:
See example code above. Running it you should see a console logged "TEST" message, in 0.62.0-rc.3, it does not appear.
Can you help us fix this issue by submitting a pull request?
Yes, though I don't know what's wrong yet.
The text was updated successfully, but these errors were encountered: