Browse Source

prepare pop by id

Daniel Zlotin 7 years ago
parent
commit
c02c75a42f

+ 2
- 0
AndroidE2E/app/src/androidTest/java/com/reactnativenavigation/e2e/androide2e/ApplicationLifecycleTest.java View File

@@ -3,10 +3,12 @@ package com.reactnativenavigation.e2e.androide2e;
3 3
 import android.support.test.uiautomator.By;
4 4
 
5 5
 import org.junit.FixMethodOrder;
6
+import org.junit.Ignore;
6 7
 import org.junit.Test;
7 8
 import org.junit.runners.MethodSorters;
8 9
 
9 10
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
11
+@Ignore
10 12
 public class ApplicationLifecycleTest extends BaseTest {
11 13
 
12 14
 	@Test

+ 4
- 2
AndroidE2E/app/src/androidTest/java/com/reactnativenavigation/e2e/androide2e/ScreenStackTest.java View File

@@ -2,7 +2,6 @@ package com.reactnativenavigation.e2e.androide2e;
2 2
 
3 3
 import android.support.test.uiautomator.By;
4 4
 
5
-import org.junit.Ignore;
6 5
 import org.junit.Test;
7 6
 
8 7
 public class ScreenStackTest extends BaseTest {
@@ -18,7 +17,6 @@ public class ScreenStackTest extends BaseTest {
18 17
 	}
19 18
 
20 19
 	@Test
21
-	@Ignore
22 20
 	public void popScreenDeepInTheStack() throws Exception {
23 21
 		launchTheApp();
24 22
 		assertMainShown();
@@ -27,5 +25,9 @@ public class ScreenStackTest extends BaseTest {
27 25
 		assertExists(By.text("Stack Position: 1"));
28 26
 		elementByText("PUSH").click();
29 27
 		assertExists(By.text("Stack Position: 2"));
28
+		elementByText("Pop Previous").click();
29
+		assertExists(By.text("Stack Position: 2"));
30
+		elementByText("Pop").click();
31
+		assertMainShown();
30 32
 	}
31 33
 }

+ 2
- 0
AndroidE2E/app/src/androidTest/java/com/reactnativenavigation/e2e/androide2e/TopLevelApiTest.java View File

@@ -2,8 +2,10 @@ package com.reactnativenavigation.e2e.androide2e;
2 2
 
3 3
 import android.support.test.uiautomator.By;
4 4
 
5
+import org.junit.Ignore;
5 6
 import org.junit.Test;
6 7
 
8
+@Ignore
7 9
 public class TopLevelApiTest extends BaseTest {
8 10
 
9 11
 	@Test

+ 4
- 0
lib/android/app/src/main/java/com/reactnativenavigation/layout/impl/StackLayout.java View File

@@ -38,6 +38,10 @@ public class StackLayout implements Layout {
38 38
 		}
39 39
 	}
40 40
 
41
+	public void pop(String containerId) {
42
+
43
+	}
44
+
41 45
 	public boolean onBackPressed() {
42 46
 		if (stack.isEmpty()) {
43 47
 			return false;

+ 2
- 1
lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationModule.java View File

@@ -16,7 +16,7 @@ import com.reactnativenavigation.utils.UiThread;
16 16
 
17 17
 public class NavigationModule extends ReactContextBaseJavaModule {
18 18
 	private static final String NAME = "RNNBridgeModule";
19
-	private ReactInstanceManager reactInstanceManager;
19
+	private final ReactInstanceManager reactInstanceManager;
20 20
 
21 21
 	public NavigationModule(final ReactApplicationContext reactContext, final ReactInstanceManager reactInstanceManager) {
22 22
 		super(reactContext);
@@ -60,6 +60,7 @@ public class NavigationModule extends ReactContextBaseJavaModule {
60 60
 		handle(new Runnable() {
61 61
 			@Override
62 62
 			public void run() {
63
+
63 64
 				((StackLayout) activity().getLayout()).pop();
64 65
 			}
65 66
 		});