瀏覽代碼

fix android e2e script

Daniel Zlotin 6 年之前
父節點
當前提交
5c20987beb
共有 2 個檔案被更改,包括 4 行新增4 行删除
  1. 2
    2
      playground/android/gradle/wrapper/gradle-wrapper.properties
  2. 2
    2
      scripts/test.e2e.android.js

+ 2
- 2
playground/android/gradle/wrapper/gradle-wrapper.properties 查看文件

@@ -1,6 +1,6 @@
1
-#Thu Sep 15 09:59:50 IDT 2016
1
+#Wed Feb 14 14:56:47 IST 2018
2 2
 distributionBase=GRADLE_USER_HOME
3 3
 distributionPath=wrapper/dists
4 4
 zipStoreBase=GRADLE_USER_HOME
5 5
 zipStorePath=wrapper/dists
6
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-bin.zip
6
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

+ 2
- 2
scripts/test.e2e.android.js 查看文件

@@ -39,9 +39,9 @@ function isDeviceRunning() {
39 39
 function startEmulator() {
40 40
   console.log(`Looking for avd...`);
41 41
   const avdsRaw = exec.execSyncRead(`${process.env.ANDROID_HOME}/tools/bin/avdmanager list avd -c`);
42
-  const avdName = /^.*package\.xml(\S+)$/m.exec(avdsRaw)[1];
42
+  const avdName = _.get(/^.*package\.xml(\S+)$/m.exec(avdsRaw), '1');
43 43
   if (_.isEmpty(avdName)) {
44
-    throw new Error(`Can't find avd to launch. Please create an avd first.`);
44
+    throw new Error(`\n\n\nCan't find avd to launch. Please create an avd first.\n\n\n`);
45 45
   }
46 46
   console.log(`found avd name: ${avdName}, Launching...`);
47 47
   exec.execAsyncSilent(`${process.env.ANDROID_HOME}/tools/emulator -gpu host -no-audio @${avdName}`);