diff --git a/Detox.js b/Detox.js index 8e29de8..c41a641 100644 --- a/Detox.js +++ b/Detox.js @@ -84,6 +84,7 @@ let waitFor; * * `reloadReactNative` - should be enabled for React Native applications. * * `reuse` - reuse application for tests. By default, Detox reinstalls and relaunches app. * * `registerGlobals` - (default: true) Register Detox helper functions `by`, `element`, `expect`, `waitFor` globally. + * * `url` - URL to open via deep-link each time the app is launched (android) or immediately afterwards (iOS). Useful for opening a bundle URL at the beginning of tests when working with Expo. * */ class Detox extends Helper { @@ -190,6 +191,10 @@ class Detox extends Helper { await this.device.reloadReactNative(); } else { await this.device.launchApp({ newInstance: true, url: this.options.url }); + + if (this.device.getPlatform() === 'ios' && this.options.url) { + await this.device.openURL({ url: this.options.url }); + } } }