Detox
Detox copied to clipboard
Linking.openURL() is not working with detox tests
What happened?
Linking.openURL()
doesn't work well in two cases:
When using Pressable
:
<Pressable onPress={ async () => { await Linking.openURL('https://www.wix.com'); }} testID='open-web-browser-button'> <Text> Open web browser </Text> </Pressable>
This will cause the test to hang with a message:
The app is busy with the following tasks: • There are enqueued timers.
When using Wix UILib button component (instead of the react native one):
The test will hang with the following message:
UI elements are busy: - Reason: Animations running on screen.
What was the expected behaviour?
No response
Was it tested on latest Detox?
- [X] I have tested this issue on the latest Detox release and it still reproduces.
Did your test throw out a timeout?
- [X] I have followed the instructions under Identifying which synchronization mechanism causes us to wait too much.
Help us reproduce this issue!
No response
In what environment did this happen?
Detox version: 20.20 React Native version: 0.73.2 Has Fabric (React Native's new rendering system) enabled: (no) Node version: 20 Device model: Emulator Android version: 29 Test-runner (select one): jest
Detox logs
Detox logs
paste logs here!
Device logs
Device logs
paste your device.log here!
More data, please!
No response