You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ja...@apache.org on 2019/07/02 08:43:28 UTC
[cordova-paramedic] 01/01: move displaying of saucelabs details to
test runs
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch janpio-fix_saucelabs_results
in repository https://gitbox.apache.org/repos/asf/cordova-paramedic.git
commit 084dd2b3b6d9bbbb31bb7b6c4d7a100331d6bfec
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Tue Jul 2 10:43:09 2019 +0200
move displaying of saucelabs details to test runs
---
lib/ParamedicSauceLabs.js | 3 +++
lib/paramedic.js | 16 ++++++++--------
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/lib/ParamedicSauceLabs.js b/lib/ParamedicSauceLabs.js
index b9b8718..e09b086 100644
--- a/lib/ParamedicSauceLabs.js
+++ b/lib/ParamedicSauceLabs.js
@@ -537,6 +537,9 @@ class ParamedicSauceLabs {
});
}
})
+ .fin(() => {
+ this.displaySauceDetails(this.runner.sauceBuildName);
+ })
.then(() => {
return isTestPassed;
});
diff --git a/lib/paramedic.js b/lib/paramedic.js
index 5d446cf..c7a034e 100644
--- a/lib/paramedic.js
+++ b/lib/paramedic.js
@@ -102,14 +102,9 @@ class ParamedicRunner {
isTestPassed = result;
logger.normal('Completed tests at ' + (new Date()).toLocaleTimeString() + ' with result: ' + isTestPassed);
- // If we run --shouldUseSauce immedatly fetch and return Sauce details.
- if (this.config.shouldUseSauce()) {
- return this.paramedicSauceLabs.displaySauceDetails.apply(this.paramedicSauceLabs, [this.sauceBuildName]); // eslint-disable-line
- }
-
- // When --shouldUseSauce and --justbuild is not set, fetch logs from the device.
+ // When !--shouldUseSauce and --justbuild is not set, fetch logs from the device.
if (this.config.getAction() !== 'build') {
- // collect logs and uninstall app
+ // collect logs and uninstall app
this.collectDeviceLogs();
return this.uninstallApp()
.fail(() => { /* do not fail if uninstall fails */ })
@@ -331,7 +326,12 @@ class ParamedicRunner {
.then(() => this.paramedicSauceLabs.uploadApp.apply(this.paramedicSauceLabs));
}
})
- .then(() => appiumRunner.runTests(useSauce));
+ .then(() => appiumRunner.runTests(useSauce))
+ .fin(() => {
+ if (useSauce) {
+ this.displaySauceDetails(options.sauceCaps.name);
+ }
+ });
}
runTests () {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org