detox-expo-helpers icon indicating copy to clipboard operation
detox-expo-helpers copied to clipboard

Add URLQuery parameters to test deep linking

Open mattlisiv opened this issue 6 years ago • 0 comments

An item I was looking to test with Expo and Detox was the deep linking by receiving a set of URL parameters when initially opening the application. Not sure if it is helpful for anyone else, but I created a version where a parameter can be passed into the reloadApp() function to simulate the url creation.

For instance, if I wanted to simulate the user clicking on myapp://+?id=1000, I can now pass in the following:

let params = {
        urlQueryString: {
            id:"1000"
        }
    };
await reloadApp(params);

mattlisiv avatar Mar 22 '18 20:03 mattlisiv