Daniel Zlotin 7 lat temu
rodzic
commit
f74d35c8ed
1 zmienionych plików z 5 dodań i 2 usunięć
  1. 5
    2
      scripts/test.e2e.ios.js

+ 5
- 2
scripts/test.e2e.ios.js Wyświetl plik

9
   try {
9
   try {
10
     startRecording();
10
     startRecording();
11
     const conf = release ? `release` : `debug`;
11
     const conf = release ? `release` : `debug`;
12
-    exec.execSync(`detox build --configuration ios.sim.${conf} && detox test --configuration ios.sim.${conf} ${process.env.CI ? '--cleanup' : ''}`);
12
+    exec.execSync(`detox build --configuration ios.sim.${conf}`);
13
+    exec.execAsync(`sleep 30`).then(() => {
14
+      exec.execAsync(`open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app`);
15
+    });
16
+    exec.execSync(`detox test --configuration ios.sim.${conf} ${process.env.CI ? '--cleanup' : ''}`);
13
   } finally {
17
   } finally {
14
     stopRecording();
18
     stopRecording();
15
   }
19
   }
16
 }
20
 }
17
 
21
 
18
 function startRecording() {
22
 function startRecording() {
19
-  exec.execAsync(`open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app`);
20
   const screenId = exec.execSyncRead(`ffmpeg -f avfoundation -list_devices true -i "" 2>&1 | grep "Capture screen 0" | sed -e "s/.*\\[//" -e "s/\\].*//"`);
23
   const screenId = exec.execSyncRead(`ffmpeg -f avfoundation -list_devices true -i "" 2>&1 | grep "Capture screen 0" | sed -e "s/.*\\[//" -e "s/\\].*//"`);
21
   exec.execAsync(`ffmpeg -f avfoundation -i "${screenId}:none" out.avi`);
24
   exec.execAsync(`ffmpeg -f avfoundation -i "${screenId}:none" out.avi`);
22
 }
25
 }