Implements review feedback

This commit is contained in:
emelko
2019-08-13 12:13:29 +09:00
parent 82cf26334f
commit a7d6cdc8cc
+12 -8
View File
@@ -84,7 +84,7 @@ $ npm test
``` ```
### End to end tests ### End to end tests
- Check testing device in [package.json](https://gitlab.com/bloodyhealth/drip/blob/master/package.json) under: 1. Check what testing device is specified in [package.json](https://gitlab.com/bloodyhealth/drip/blob/master/package.json) under:
``` ```
{"detox": {"detox":
{"configurations": {"configurations":
@@ -93,17 +93,21 @@ $ npm test
} }
} }
``` ```
- Open Android Studio and go to -> Tools -> AVD manager -> `+Create virtual device` and select the device checked in the previous step 2. Check if the current device is already installed on your machine. Go to `cd ~/Android/sdk/emulator/` or wherever you have Android installed on your machine. Here you can run `./emulator -list-avds` and compare the devices with the one you found in step 1.
- Find the emulator on your machine to run it without heavy Android Studio, e.g. in `~/Android/Sdk/emulator` OR chose to run the emulator within Android Studio 3. Open Android Studio and go to -> Tools -> AVD manager -> `+Create virtual device` and select the device checked in the previous step
- Here run: `$ ./emulator -avd NEXUS_DEVICE_OR_WHATEVER_SPECIFIED_DEVICE` 4. Use the emulator on your machine to run it without heavy Android Studio, e.g. in `~/Android/Sdk/emulator` OR chose to run the emulator within Android Studio
- You might need to specify the following environment variables in your zsh or bash file according to where you have it installed: 4.1 Here run: `$ ./emulator -avd NEXUS_DEVICE_OR_WHATEVER_SPECIFIED_DEVICE`
4.2 You might need to specify the following environment variables in your zsh or bash file according to where you have it installed:
``` ```
export ANDROID_HOME="/home/myname/Android/Sdk" export ANDROID_HOME="/home/myname/Android/Sdk"
export ANDROID_SDK_ROOT="/home/myname/Android/Sdk" export ANDROID_SDK_ROOT="/home/myname/Android/Sdk"
export ANDROID_AVD_HOME="/home/myname/.android/avd export ANDROID_AVD_HOME="/home/myname/.android/avd"
``` ```
- Open a new tab to run `npm run android` 5. For the first time you need to get the app on the phone or if you run into this error:
- Open a new tab to run `./node_modules/.bin/detox test -c android.emu.debug` `'app-debug-androidTest.apk' could not be found`
--> open a new 2nd tab and run (in your drip folder): `cd android and ./gradlew assembleAndroidTest`
Otherwise just open a new 2nd tab to run (in your drip folder) `npm run android`
6. Open a new 3rd tab to run `./node_modules/.bin/detox test -c android.emu.debug`
Hopefully you see the magic happening clicking through the app and happy test results on your console :sun_with_face: ! Hopefully you see the magic happening clicking through the app and happy test results on your console :sun_with_face: !