Quellcode durchsuchen

wrote empty modal e2e's

Daniel Zlotin vor 7 Jahren
Ursprung
Commit
5abff9fbf1

+ 2
- 0
AndroidE2E/app/src/androidTest/java/com/reactnativenavigation/e2e/androide2e/BaseTest.java Datei anzeigen

@@ -77,6 +77,8 @@ public abstract class BaseTest {
77 77
 
78 78
 	public void assertExists(BySelector selector) {
79 79
 		assertThat(device().wait(Until.hasObject(selector), TIMEOUT)).isTrue();
80
+		assertThat(device().findObject(selector).getVisibleCenter().x).isPositive().isLessThan(device().getDisplayWidth());
81
+		assertThat(device().findObject(selector).getVisibleCenter().y).isPositive().isLessThan(device().getDisplayHeight());
80 82
 	}
81 83
 
82 84
 	public void swipeOpenLeftSideMenu() {

+ 61
- 0
AndroidE2E/app/src/androidTest/java/com/reactnativenavigation/e2e/androide2e/ModalsTest.java Datei anzeigen

@@ -0,0 +1,61 @@
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
+import static org.junit.Assert.fail;
9
+
10
+public class ModalsTest extends BaseTest {
11
+	@Ignore
12
+	@Test
13
+	public void showModal() throws Exception {
14
+		launchTheApp();
15
+		assertMainShown();
16
+		elementByText("SHOW MODAL").click();
17
+		assertExists(By.text("Modal Screen"));
18
+	}
19
+
20
+	@Ignore
21
+	@Test
22
+	public void dismissModal() throws Exception {
23
+		fail("to implement");
24
+	}
25
+
26
+	@Ignore
27
+	@Test
28
+	public void showMultipleModals() throws Exception {
29
+		fail("to implement");
30
+	}
31
+
32
+	@Ignore
33
+	@Test
34
+	public void dismissUnknownContainerId() throws Exception {
35
+		fail("to implement");
36
+	}
37
+
38
+	@Ignore
39
+	@Test
40
+	public void dismissModalByContainerIdWhenNotOnTop() throws Exception {
41
+		fail("to implement");
42
+	}
43
+
44
+	@Ignore
45
+	@Test
46
+	public void dismissAllPreviousModalsByIdWhenTheyAreBelowTopPresented() throws Exception {
47
+		fail("to implement");
48
+	}
49
+
50
+	@Ignore
51
+	@Test
52
+	public void dismissSomeModalByIdDeepInTheStack() throws Exception {
53
+		fail("to implement");
54
+	}
55
+
56
+	@Ignore
57
+	@Test
58
+	public void dismissAllModals() throws Exception {
59
+		fail("to implement");
60
+	}
61
+}