This template was built in order to help you speed things up a little bit when opening an issue/bug. It saves you the time of setting up a completely new project just for demostrating the problem you encountered.
When opening an issue in Detox, use this template in order to create an example which reprduced your issue. These examples would help us speed up the process and solve the issue/bug you've submitted. Just fork it and feel free to add/change things to this short project which will help to reprudce the issue you encounter with!
- Fork the project
- Clone it locally
- Run
npm install
- Also run:
npm install -g detox-cli
Building the project:
npm run build:android-debug
Launching the metro JS bundler (for auto app-reload):
npm start
Executing the tests (with the metro bundler server running in the background):
- Find which Android AVD you have installed (or set one up)
- Assuming you wish to run your tests on
Pixel_4_API_30
(detox isPixel_3A_API_29
), run:
npm run test:android-debug -- -n Pixel_4_API_30
Building the project:
npm run build:android-release
Executing the tests (metro-budler not needed):
- Find which Android AVD you have installed (or set one up)
- Assuming you wish to run your tests on
Pixel_4_API_30
(detox isPixel_3A_API_29
), run:
npm run test:android-release -- -n Pixel_4_API_30
First install pods:
Install Cocoapods if you don't have it already.
npm run podInstall
Building the project:
npm run build:ios-debug
Launching the metro JS bundler (for auto app-reload):
npm start
Executing the tests (with the metro bundler server running in the background):
npm run test:ios-debug
Install pods if you didn't already:
npm run podInstall
Building the project:
npm run build:ios-release
Executing the tests (metro-budler not needed):
npm run test:ios-release
Unfortunately, there is no one-size-fits-all formula for that. However, once you're managed to properly build and run the preexisting dummy Detox test at least once on the associated platform (Android/iOS) - generally you'd have to:
- Edit the build dependencies scripts (
build.gradle
andapp/build.gradle
on Android, orPodfile
on iOS) in order to add specific dependencies you think might be related to your issue. - Either change the preexisting example screen, written in JSX - or add new ones (i.e. under
Screens/
). For the latter approach, be sure to also export your screens inScreens/index.js
, and add a way to navigate to them in the main screen (e.g. a button inApp.js
). - Either edit the preexisting Detox test case (see
e2e/ExampleScreen.e2e.js
), or add your custom one (i.e. undere2e/
) -- which runs a flow where your problem gets reproduced.
Should you manage to have your issue properly reproduced: git commit
and git push
your changes, and share a link to your repo as a comment in your Detox issue!