Bladeren bron

fixed js tests

Daniel Zlotin 6 jaren geleden
bovenliggende
commit
022ca1ec79
3 gewijzigde bestanden met toevoegingen van 10 en 8 verwijderingen
  1. 4
    2
      e2e/AndroidUtils.js
  2. 5
    5
      e2e/ApplicationLifecycleTest.test.js
  3. 1
    1
      e2e/StaticLifecycleEvents.test.js

+ 4
- 2
e2e/AndroidUtils.js Bestand weergeven

@@ -19,5 +19,7 @@ module.exports = {
19 19
   openActivity: () => {
20 20
     exec.execSync('adb shell am start -n com.reactnativenavigation.playground/.MainActivity');
21 21
   },
22
-  executeShellCommand: (command) => exec.execSync(`adb shell ${command}`)
23
-}
22
+  executeShellCommand: (command) => {
23
+    exec.execSync(`adb shell ${command}`);
24
+  }
25
+};

+ 5
- 5
e2e/ApplicationLifecycleTest.test.js Bestand weergeven

@@ -43,7 +43,7 @@ describe('application lifecycle test', () => {
43 43
   it(':android: device orientation does not destroy activity', async () => {
44 44
     await elementById(testIDs.PUSH_BUTTON).tap();
45 45
     await expect(elementByLabel('Pushed Screen')).toBeVisible();
46
-    
46
+
47 47
     await device.setOrientation('landscape');
48 48
 
49 49
     await expect(elementByLabel('Pushed Screen')).toBeVisible();
@@ -60,7 +60,7 @@ describe('application lifecycle test', () => {
60 60
     await expect(elementByLabel('Pushed Screen')).toBeNotVisible();
61 61
     await expect(elementByLabel('React Native Navigation!')).toBeVisible();
62 62
   });
63
-  
63
+
64 64
   xit(':android: pressing menu opens dev menu', async () => {
65 65
     if (!IS_RELEASE) {
66 66
       Android.pressMenu();
@@ -101,12 +101,12 @@ describe('application lifecycle test', () => {
101 101
       await expect(elementByLabel('Pushed Screen')).toBeVisible();
102 102
 
103 103
       Android.executeShellCommand('am broadcast -a com.reactnativenavigation.broadcast.RELOAD');
104
-      
104
+
105 105
       await sleep(1000);
106 106
       await expect(elementByLabel('React Native Navigation!')).toBeVisible();
107 107
     }
108 108
   });
109
-  
109
+
110 110
   async function togglePhonePermission() {
111 111
     await sleep(700);
112 112
     Android.revokePermission();
@@ -114,4 +114,4 @@ describe('application lifecycle test', () => {
114 114
     Android.grantPermission();
115 115
     await sleep(1000);
116 116
   }
117
-});
117
+});

+ 1
- 1
e2e/StaticLifecycleEvents.test.js Bestand weergeven

@@ -15,4 +15,4 @@ describe('Overlay', () => {
15 15
     await expect(elementByLabel('didAppear | navigation.playground.PushedScreen')).toBeVisible();
16 16
     await expect(elementByLabel('didDisappear | navigation.playground.WelcomeScreen')).toBeVisible();
17 17
   });
18
-});
18
+});