cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alsoro...@apache.org
Subject cordova-medic git commit: Fix the location of the Appium screenshots folder
Date Wed, 02 Mar 2016 15:45:49 GMT
Repository: cordova-medic
Updated Branches:
  refs/heads/master b3ccc0748 -> 4bd711ccc


Fix the location of the Appium screenshots folder


Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/4bd711cc
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/4bd711cc
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/4bd711cc

Branch: refs/heads/master
Commit: 4bd711ccce6694969e1c2d86f165d67546e08b48
Parents: b3ccc07
Author: Alexander Sorokin <alexander.sorokin@akvelon.com>
Authored: Wed Mar 2 18:45:35 2016 +0300
Committer: Alexander Sorokin <alexander.sorokin@akvelon.com>
Committed: Wed Mar 2 18:45:35 2016 +0300

----------------------------------------------------------------------
 medic/medic-appium.js | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/4bd711cc/medic/medic-appium.js
----------------------------------------------------------------------
diff --git a/medic/medic-appium.js b/medic/medic-appium.js
index e7033f9..20afe52 100644
--- a/medic/medic-appium.js
+++ b/medic/medic-appium.js
@@ -104,7 +104,6 @@ function parseArgs() {
             .default("output", path.join(__dirname, "../../test_summary.json"))
             .describe("output", "A file that will store test results")
             .describe("plugins", "A space-separated list of plugins to test.")
-            .default("screenshotPath", path.join(__dirname, "appium_screenshots"))
             .describe("screenshotPath", "A directory to save screenshots to, either absolute
or relative to the directory containing cordova-medic.")
             .argv;
 
@@ -116,7 +115,15 @@ function parseArgs() {
     options.udid = argv.udid;
     options.device = argv.device;
     options.outputPath = argv.output;
-    options.screenshotPath = path.normalize(argv.screenshotPath);
+    if (argv.screenshotPath) {
+        if (path.isAbsolute(argv.screenshotPath)){
+            options.screenshotPath = path.normalize(argv.screenshotPath);
+        } else {
+            options.screenshotPath = path.join(__dirname, "../..", argv.screenshotPath);
+        }
+    } else {
+        options.screenshotPath = path.join(__dirname, "../../appium_screenshots");
+    }
 
     // accepting both "plugins" or "plugin" arguments
     // if there is none, using default plugin list


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message