react-native-firebase/tests-new
Salakar 2fa3ee006d [tests] new test infra - coverage for days 2018-03-25 06:52:30 +01:00
..
android wip 2018-03-24 05:53:49 +00:00
bridge/env [tests] new test infra - coverage for days 2018-03-25 06:52:30 +01:00
e2e [tests] new test infra - coverage for days 2018-03-25 06:52:30 +01:00
firebase [wip] new testing infra 2018-03-23 14:26:11 +00:00
ios start of new testing infra 2018-03-23 13:40:07 +00:00
.babelrc [tests] new test infra - coverage for days 2018-03-25 06:52:30 +01:00
.buckconfig start of new testing infra 2018-03-23 13:40:07 +00:00
.editorconfig [wip] new testing infra 2018-03-23 14:26:11 +00:00
.eslintrc [wip] new testing infra 2018-03-23 14:26:11 +00:00
.flowconfig start of new testing infra 2018-03-23 13:40:07 +00:00
.gitignore start of new testing infra 2018-03-23 13:40:07 +00:00
.watchmanconfig start of new testing infra 2018-03-23 13:40:07 +00:00
README.md wip 2018-03-24 06:31:04 +00:00
app.js [tests] new test infra - start of bridge cleanup 2018-03-25 02:23:46 +01:00
index.android.js start of new testing infra 2018-03-23 13:40:07 +00:00
index.js ignore 2018-03-24 02:02:59 +00:00
package-lock.json [tests] new test infra - coverage for days 2018-03-25 06:52:30 +01:00
package.json [tests] new test infra - coverage for days 2018-03-25 06:52:30 +01:00
rn-cli.config.js start of new testing infra 2018-03-23 13:40:07 +00:00

README.md

React Native Firebase - Testing Project

Requirements

  • Make sure you have Xcode installed (tested with Xcode 8.1-8.2).
  • make sure you have node installed (brew install node, node 7.6.0 and up is required.
  • Make sure you have react-native dependencies installed:
    • react-native-cli is installed (npm install -g react-native-cli)
    • watchman is installed (brew install watchman)
    • appleSimUtils
    • detox-cli npm install -g detox-cli

Step 1: Npm install

  • Run npm install.

To test Release build of your app

Step 2: Build

  • Build the demo project
detox build --configuration ios.sim.release

Step 3: Test

  • Run tests on the demo project
detox test --configuration ios.sim.release

This action will open a new simulator and run the tests on it.

To test Debug build of your app

Step 2: Build

  • Build the demo project
detox build --configuration ios.sim.debug

Step 3: Test

  • start react-native packager
npm run start
  • Run tests on the demo project
detox test --configuration ios.sim.debug

This action will open a new simulator and run the tests on it.

TODO - Troubleshooting

Gradle issues... https://stackoverflow.com/questions/46917365/error-could-not-initialize-class-com-android-sdklib-repository-androidsdkhandle?rq=1

mac: export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home" windows "C://Program Files/Java/jdk_1.x_"

android sdk root export ANDROID_SDK_ROOT="/Users/mike/Library/Android/sdk"

Add platform-tools to your path

echo 'export ANDROID_HOME=/Users/$USER/Library/Android/sdk' >> ~/.bash_profile echo 'export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools' >> ~/.bash_profile

Name: TestingAVD

CPU/ABI: null (null)

Path: /Users/mike/.android/avd/Actually_THIS_one.avd

Error: Failed to parse properties from /Users/mike/.android/avd/Actually_THIS_one.avd/config.ini

Running specific tests

Add a --grep to e2e/mocha.opts file, e.g. --grep auth for all tests that have auth in the file path or tests descriptions.

Running Node debugger

Add --inspect to e2e/mocha.opts file

To open node debugger tools on chrome navigate to chrome://inspect/#devices and click the Open dedicated DevTools for Node link.

Add the default connection of localhost:9229 if you haven't already - then the debugger will automatically connect everytime you start tests with inspect flag.

Mocha options

See https://mochajs.org/#usage