|
@@ -1,28 +1,33 @@
|
1
|
1
|
package com.reactnativenavigation.e2e.androide2e;
|
2
|
2
|
|
3
|
3
|
import android.support.test.uiautomator.By;
|
|
4
|
+import android.support.test.uiautomator.UiObjectNotFoundException;
|
4
|
5
|
|
5
|
6
|
import org.junit.Test;
|
6
|
7
|
|
7
|
8
|
public class OverlayTest extends BaseTest {
|
8
|
9
|
|
9
|
10
|
@Test
|
10
|
|
- public void testOverlayInterAlertAppear() throws Exception {
|
|
11
|
+ public void testOverlayAlertAppear() throws Exception {
|
11
|
12
|
elementByText("PUSH OPTIONS SCREEN").click();
|
12
|
|
- elementByText("SHOW OVERLAY INTER").click();
|
|
13
|
+ elementByText("SHOW OVERLAY").click();
|
13
|
14
|
assertExists(By.text("Test view"));
|
14
|
|
- elementByText("OK").click();
|
15
|
|
- assertExists(By.text("Overlay disappeared"));
|
16
|
|
- elementByText("OK").click();
|
|
15
|
+ assetDismissed();
|
17
|
16
|
}
|
18
|
17
|
|
19
|
|
- @Test
|
20
|
|
- public void testOverlayNotInterAlertAppear() throws Exception {
|
|
18
|
+ @Test
|
|
19
|
+ public void testOverlayNotInterceptingTouchEvents() throws Exception {
|
21
|
20
|
elementByText("PUSH OPTIONS SCREEN").click();
|
22
|
|
- elementByText("SHOW TOUCH THROUGH OVERLAY NOTINTER").click();
|
|
21
|
+ elementByText("SHOW TOUCH THROUGH OVERLAY").click();
|
23
|
22
|
assertExists(By.text("Test view"));
|
24
|
|
- elementByText("OK").click();
|
25
|
|
- assertExists(By.text("Overlay disappeared"));
|
26
|
|
- elementByText("OK").click();
|
|
23
|
+ elementByText("DYNAMIC OPTIONS").click();
|
|
24
|
+ assertExists(By.text("Dynamic Title"));
|
|
25
|
+ assetDismissed();
|
27
|
26
|
}
|
|
27
|
+
|
|
28
|
+ private void assetDismissed() throws UiObjectNotFoundException {
|
|
29
|
+ elementByText("OK").click();
|
|
30
|
+ assertExists(By.text("Overlay disappeared"));
|
|
31
|
+ elementByText("OK").click();
|
|
32
|
+ }
|
28
|
33
|
}
|