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