Browse Source

e2e scripts

Daniel Zlotin 8 years ago
parent
commit
ac83f5c163
2 changed files with 3 additions and 3 deletions
  1. 1
    2
      playground/e2e/init.js
  2. 2
    1
      playground/scripts/e2e.ios.js

+ 1
- 2
playground/e2e/init.js View File

@@ -3,11 +3,10 @@ require('babel-polyfill');
3 3
 const detox = require('detox');
4 4
 const detoxConfig = require('../package.json').detox;
5 5
 
6
-const release = process.env.detoxMode === 'release';
6
+detoxConfig['ios-simulator'].app = process.env.detoxAppBuildPath;
7 7
 
8 8
 before(function(done) {
9 9
   this.timeout(30000);
10
-  detoxConfig['ios-simulator'].app = `ios/DerivedData/playground/Build/Products/${release ? 'Release' : 'Debug'}_Detox-iphonesimulator/playground.app`;
11 10
   detox.config(detoxConfig);
12 11
   detox.start(done);
13 12
 });

+ 2
- 1
playground/scripts/e2e.ios.js View File

@@ -28,7 +28,8 @@ function e2e() {
28 28
   try {
29 29
     kill(`detox-server`);
30 30
     exec.execAsync(`./node_modules/.bin/detox-server > ./detox-server.log 2>&1`);
31
-    exec.exec(`${release ? 'detoxMode=release' : ''} BABEL_ENV=test ./node_modules/mocha/bin/mocha e2e --recursive --compilers js:babel-register`);
31
+    const detoxAppBuildPath = `ios/DerivedData/playground/Build/Products/${release ? 'Release' : 'Debug'}_Detox-iphonesimulator/playground.app`;
32
+    exec.exec(`detoxAppBuildPath="${detoxAppBuildPath}" BABEL_ENV=test ./node_modules/mocha/bin/mocha e2e --recursive --compilers js:babel-register`);
32 33
   } finally {
33 34
     kill(`detox-server`);
34 35
     if (release) {