Browse Source

fixed releases and ios e2e on travis

Daniel Zlotin 7 years ago
parent
commit
e1e95988e0
6 changed files with 22 additions and 14 deletions
  1. 3
    0
      .travis.yml
  2. 3
    4
      e2e/Modals.test.js
  3. 3
    4
      e2e/ScreenStack.test.js
  4. 5
    2
      e2e/ScreenStyleStatic.test.js
  5. 3
    4
      e2e/TopLevelApi.test.js
  6. 5
    0
      e2e/Utils.js

+ 3
- 0
.travis.yml View File

13
   - master
13
   - master
14
   - v2
14
   - v2
15
 
15
 
16
+git:
17
+  depth: 999999999999
18
+
16
 before_cache:
19
 before_cache:
17
   - rm -f  $HOME/.gradle/caches/modules-2/modules-2.lock
20
   - rm -f  $HOME/.gradle/caches/modules-2/modules-2.lock
18
   - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
21
   - rm -fr $HOME/.gradle/caches/*/plugin-resolution/

+ 3
- 4
e2e/Modals.test.js View File

1
+const Utils = require('./Utils');
2
+const elementByLabel = Utils.elementByLabel;
3
+
1
 describe('modal', () => {
4
 describe('modal', () => {
2
   beforeEach(async () => {
5
   beforeEach(async () => {
3
     await device.relaunchApp();
6
     await device.relaunchApp();
88
     await expect(elementByLabel('React Native Navigation!')).toBeVisible();
91
     await expect(elementByLabel('React Native Navigation!')).toBeVisible();
89
   });
92
   });
90
 });
93
 });
91
-
92
-function elementByLabel(label) {
93
-  return element(by.label(label));
94
-}

+ 3
- 4
e2e/ScreenStack.test.js View File

1
+const Utils = require('./Utils');
2
+const elementByLabel = Utils.elementByLabel;
3
+
1
 describe('screen stack', () => {
4
 describe('screen stack', () => {
2
   beforeEach(async () => {
5
   beforeEach(async () => {
3
     await device.relaunchApp();
6
     await device.relaunchApp();
38
     await expect(elementByLabel('React Native Navigation!')).toBeVisible();
41
     await expect(elementByLabel('React Native Navigation!')).toBeVisible();
39
   });
42
   });
40
 });
43
 });
41
-
42
-function elementByLabel(label) {
43
-  return element(by.label(label));
44
-}

+ 5
- 2
e2e/ScreenStyleStatic.test.js View File

1
+const Utils = require('./Utils');
2
+const elementByLabel = Utils.elementByLabel;
3
+
1
 describe('screen style - static', () => {
4
 describe('screen style - static', () => {
2
   beforeEach(async () => {
5
   beforeEach(async () => {
3
     await device.relaunchApp();
6
     await device.relaunchApp();
4
   });
7
   });
5
 
8
 
6
   it('declare a navigationOptions on container component', async () => {
9
   it('declare a navigationOptions on container component', async () => {
7
-    await element(by.label('Push Options Screen')).tap();
8
-    await expect(element(by.label('Static Title').and(by.type('UILabel')))).toBeVisible();
10
+    await elementByLabel('Push Options Screen').tap();
11
+    await expect(elementByLabel('Static Title').and(by.type('UILabel'))).toBeVisible();
9
   });
12
   });
10
 });
13
 });

+ 3
- 4
e2e/TopLevelApi.test.js View File

1
+const Utils = require('./Utils');
2
+const elementByLabel = Utils.elementByLabel;
3
+
1
 describe('top level api', () => {
4
 describe('top level api', () => {
2
   beforeEach(async () => {
5
   beforeEach(async () => {
3
     await device.relaunchApp();
6
     await device.relaunchApp();
48
     await expect(elementByLabel('React Native Navigation!')).toBeVisible();
51
     await expect(elementByLabel('React Native Navigation!')).toBeVisible();
49
   });
52
   });
50
 });
53
 });
51
-
52
-function elementByLabel(label) {
53
-  return element(by.label(label));
54
-}

+ 5
- 0
e2e/Utils.js View File

1
+module.exports = {
2
+  elementByLabel: (label) => {
3
+    return element(by.label(label));
4
+  }
5
+};