Browse Source

e2e works

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

+ 3
- 3
playground/e2e/app.test.js View File

1
-describe('app', function() {
2
-  beforeEach(function(done) {
1
+describe('app', () => {
2
+  beforeEach((done) => {
3
     global.simulator.relaunchApp(done);
3
     global.simulator.relaunchApp(done);
4
   });
4
   });
5
 
5
 
6
-  it('shows welcome screen', function() {
6
+  it('shows welcome screen', () => {
7
     expect(element(by.label('React Native Navigation!'))).toBeVisible();
7
     expect(element(by.label('React Native Navigation!'))).toBeVisible();
8
   });
8
   });
9
 });
9
 });

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

4
 const config = require('../package.json').detox;
4
 const config = require('../package.json').detox;
5
 
5
 
6
 before(function(done) {
6
 before(function(done) {
7
-  this.timeout(60000);
7
+  this.timeout(30000);
8
   detox.config(config);
8
   detox.config(config);
9
   detox.start(done);
9
   detox.start(done);
10
 });
10
 });

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

25
   try {
25
   try {
26
     kill(`detox-server`);
26
     kill(`detox-server`);
27
     cp.exec(`./node_modules/.bin/detox-server > ./detox-server.log 2>&1`);
27
     cp.exec(`./node_modules/.bin/detox-server > ./detox-server.log 2>&1`);
28
-    exec(`BABEL_ENV=test ./node_modules/mocha/bin/mocha e2e --recursive --timeout 120000 --compilers js:babel-register`);
28
+    exec(`BABEL_ENV=test ./node_modules/mocha/bin/mocha e2e --recursive --timeout 30000 --compilers js:babel-register`);
29
   } finally {
29
   } finally {
30
     kill(`detox-server`);
30
     kill(`detox-server`);
31
     kill(`Simulator`);
31
     kill(`Simulator`);