Daniel Zlotin 7 years ago
parent
commit
969dab2bec

+ 29
- 0
playground/e2e/androidLifecycle.test.js View File

@@ -0,0 +1,29 @@
1
+xdescribe('android application lifecycle', () => {
2
+  it('normal launch', () => {
3
+    //
4
+  });
5
+
6
+  it('launch already running in background', () => {
7
+    //
8
+  });
9
+
10
+  it('launch after activity killed by system', () => {
11
+    //
12
+  });
13
+
14
+  it('launch and ask react overlay permissions', () => {
15
+    //
16
+  });
17
+
18
+  it('launch after reactContext killed by system', () => {
19
+    //
20
+  });
21
+
22
+  it('launch from push notification', () => {
23
+    //
24
+  });
25
+
26
+  it('launch from intent filter', () => {
27
+    //
28
+  });
29
+});

+ 0
- 38
playground/e2e/app.test.android.js View File

@@ -1,38 +0,0 @@
1
-xdescribe('app android', () => {
2
-  beforeEach((done) => {
3
-    global.simulator.relaunchApp(done);
4
-  });
5
-
6
-  it('shows welcome screen', () => {
7
-    expect(elementByLabel('React Native Navigation!')).toBeVisible();
8
-  });
9
-
10
-  it('switch to tab based app, passProps and functions', () => {
11
-    elementByLabel('Switch to tab based app').tap();
12
-    expect(elementByLabel('This is tab 1')).toBeVisible();
13
-    expect(elementByLabel('Hello from a function!')).toBeVisible();
14
-  });
15
-
16
-  it('push screen', () => {
17
-    elementByLabel('Push').tap();
18
-    expect(elementByLabel('Pushed screen')).toBeVisible();
19
-  });
20
-
21
-  xit('switch to tabs with side menus', () => {
22
-    elementByLabel('Switch to tab based app with side menus').tap();
23
-    elementByLabel('Switch to tab based app with side menus').swipeRight();
24
-    expect(elementByLabel('This is a side menu screen')).toBeVisible();
25
-  });
26
-
27
-  it('screen lifecycle', () => {
28
-    elementByLabel('Switch to lifecycle screen').tap();
29
-    expect(elementByLabel('onStart!')).toBeVisible();
30
-    elementByLabel('Push to test onStop').tap();
31
-    expect(elementByLabel('Alert')).toBeVisible();
32
-    expect(elementByLabel('onStop!')).toBeVisible();
33
-  });
34
-});
35
-
36
-function elementByLabel(label) {
37
-  return element(by.label(label));
38
-}

playground/e2e/app.test.ios.js → playground/e2e/app.test.js View File

@@ -1,4 +1,4 @@
1
-describe('app ios', () => {
1
+describe('app', () => {
2 2
   beforeEach((done) => {
3 3
     global.simulator.relaunchApp(done);
4 4
   });

+ 1
- 1
src/containers/ContainerWrapper.test.js View File

@@ -130,7 +130,7 @@ describe('ContainerWrapper', () => {
130 130
     const NavigationContainer = ContainerWrapper.wrap(containerName, MyContainer, store);
131 131
     const tree = renderer.create(<NavigationContainer id={'container1'} />);
132 132
     const instance = tree.getInstance();
133
-    expect(instance.originalContainerRef).not.toBeFalsy();
133
+    expect(instance.originalContainerRef).toBeInstanceOf(Component);
134 134
     tree.unmount();
135 135
     expect(instance.originalContainerRef).toBeFalsy();
136 136
   });