Browse Source

android: relaunching after closing works

Daniel Zlotin 7 years ago
parent
commit
eeab236085

+ 7
- 7
playground/android/app/src/androidTest/java/com/reactnativenavigation/playground/ApplicationLifecycleTest.java View File

81
         onView(withText("React Native Navigation!")).check(matches(isDisplayed()));
81
         onView(withText("React Native Navigation!")).check(matches(isDisplayed()));
82
     }
82
     }
83
 
83
 
84
-//    @Test
85
-//    public void _3_relaunchAfterClose() throws Exception {
86
-//        launchActivity();
87
-//        uiDevice().pressBack();
88
-//        launchActivity();
89
-//        onView(withText("React Native Navigation!")).check(matches(isDisplayed()));
90
-//    }
84
+    @Test
85
+    public void _3_relaunchAfterClose() throws Exception {
86
+        rule.launchActivity(null);
87
+        uiDevice().pressBack();
88
+        rule.launchActivity(null);
89
+        onView(withText("React Native Navigation!")).check(matches(isDisplayed()));
90
+    }
91
 }
91
 }
92
 //    xdescribe('android application lifecycle', () => {
92
 //    xdescribe('android application lifecycle', () => {
93
 ////launch, pause, and resume
93
 ////launch, pause, and resume