Touchable inside FullWindowOverlay can't be pressed by Detox
See original GitHub issueWhat happened?
We have a custom Toast component that is using FullWindowOverlay (by react-native-screens) so we can display a Toast even above Modals. However when we’re trying to tap on a touchable inside this detox fails to do so. We get the following error message:
Test Failed: View is not hittable at its visible point. Error: Failed to hit view with identifier `toast-pressable` at point {207, 805.5} with hit-test
- Origin view: <RCTRootView: 0x7fb332b06ee0; frame = (0 0; 414 896); autoresize = W+H; backgroundColor = <UIDynamicSystemColor: 0x600003c57ec0; name = systemBackgroundColor>; layer = <CALayer: 0x600002945a00>>
- Absolute origin: {0, 0}
- Hit: <RCTView: 0x7fb322818320; reactTag: 17; frame = (0 48; 414 814); backgroundColor = UIExtendedSRGBColorSpace 1 1 1 1; layer = <CALayer: 0x6000029412c0>>
- Target view: <RCTView: 0x7fb332a08490; reactTag: 45; frame = (16 0; 382 17); layer = <CALayer: 0x600002f80300>>
- Relative point: {207, 805.5}
If I replace FullWindowOverlay with a plain View tests works fine.
What was the expected behaviour?
Touchables inside FullWindowOverlay should also be tappable by Detox
Was it tested on latest Detox?
- I have tested this issue on the latest Detox release and it still reproduces.
Did your test throw out a timeout?
- I have followed the instructions under Identifying which synchronization mechanism causes us to wait too much.
Help us reproduce this issue!
https://drive.google.com/file/d/1owxETvumtwaSicHpp8moAtda3AEdNQ2t/view?usp=sharing
In what environment did this happen?
Detox version: 20.0.3 React Native version: 0.70.6 Node version: v14 latest Device model: iPhone 11 iOS version: 16.0 macOS version: 12.6 Xcode version: 14.0 Test-runner (select one): jest
Detox logs
Detox logs
paste logs here!
Device logs
Device logs
paste logs here!
More data, please!
No response
Issue Analytics
- State:
- Created 10 months ago
- Comments:12 (8 by maintainers)
Top Results From Across the Web
Touchable inside FullWindowOverlay can't be pressed by Detox
Gray box end-to-end testing and automation framework for mobile apps - Touchable inside FullWindowOverlay can't be pressed by Detox · wix/Detox@d988c8e.
Read more >How do I get Detox to tap on nested text elements that have an ...
The first thought could be to wrap the text that you want to be tappable in TouchableOpacity (or similar) but that will just...
Read more >Handling Touches - React Native
The "Touchable" components provide the capability to capture tapping gestures, and can display feedback when a gesture is recognized. These ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @adamivancza, I merged a fix (https://github.com/wix/Detox/pull/3753) for your issue, we plan to push it with the next Detox release. I’ll update here once we’ll release a new version (probably later today).
Hey @adamivancza, have you tested the new release (20.1.0) yet?