cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alsoro...@apache.org
Subject cordova-paramedic git commit: Skip permission buster for splashscreen plugin
Date Fri, 26 May 2017 12:15:27 GMT
Repository: cordova-paramedic
Updated Branches:
  refs/heads/master 5b8bf1503 -> 7e607a205


Skip permission buster for splashscreen plugin


Project: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/commit/7e607a20
Tree: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/tree/7e607a20
Diff: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/diff/7e607a20

Branch: refs/heads/master
Commit: 7e607a205f913fdf369f68ced552aac30a15d73d
Parents: 5b8bf15
Author: Alexander Sorokin <alexander.sorokin@akvelon.com>
Authored: Fri May 26 15:11:37 2017 +0300
Committer: Alexander Sorokin <alexander.sorokin@akvelon.com>
Committed: Fri May 26 15:13:08 2017 +0300

----------------------------------------------------------------------
 lib/appium/helpers/wdHelper.js | 13 +++++++++----
 lib/paramedic.js               | 11 ++++++++++-
 2 files changed, 19 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-paramedic/blob/7e607a20/lib/appium/helpers/wdHelper.js
----------------------------------------------------------------------
diff --git a/lib/appium/helpers/wdHelper.js b/lib/appium/helpers/wdHelper.js
index caaa4fd..1d02f08 100644
--- a/lib/appium/helpers/wdHelper.js
+++ b/lib/appium/helpers/wdHelper.js
@@ -180,7 +180,7 @@ module.exports.tapElementByXPath = function (xpath, driver) {
         });
 };
 
-module.exports.pollForEvents = function (driver, platform, windowOffset) {
+module.exports.pollForEvents = function (driver, platform, skipBuster, windowOffset) {
     var isAndroid = platform === 'android';
     var isIOS = platform === 'ios';
     if (!windowOffset) {
@@ -189,7 +189,12 @@ module.exports.pollForEvents = function (driver, platform, windowOffset)
{
     // polling for new events
     return driver
     .sleep(0)
-    .bustAlert(platform)
+    .then(function () {
+        if (skipBuster) {
+            return driver;
+        }
+        return driver.bustAlert(platform);
+    })
     .then(function() {
         if (isIOS) {
             return driver;
@@ -316,8 +321,8 @@ wd.addPromiseChainMethod('tapElementByXPath', function (xpath) {
     return module.exports.tapElementByXPath(xpath, this);
 });
 
-wd.addPromiseChainMethod('pollForEvents', function (isAndroid) {
-    return module.exports.pollForEvents(this, isAndroid);
+wd.addPromiseChainMethod('pollForEvents', function (platform, skipBuster) {
+    return module.exports.pollForEvents(this, platform, skipBuster);
 });
 
 wd.addPromiseChainMethod('addFillerImage', function () {

http://git-wip-us.apache.org/repos/asf/cordova-paramedic/blob/7e607a20/lib/paramedic.js
----------------------------------------------------------------------
diff --git a/lib/paramedic.js b/lib/paramedic.js
index 36b8edd..8698e11 100644
--- a/lib/paramedic.js
+++ b/lib/paramedic.js
@@ -844,12 +844,21 @@ ParamedicRunner.prototype.runSauceTests = function () {
         logger.normal('cordova-paramedic: connecting to app');
 
         var platform = self.config.getPlatformId();
+        var plugins = self.config.getPlugins();
+        var skipBuster = false;
+        // skip permission buster for splashscreen plugin
+        // it hangs the test run on Android 7 for some reason
+        for (var i = 0; i < plugins.length; i++) {
+            if (plugins[i].indexOf('cordova-plugin-splashscreen') >= 0) {
+                skipBuster = true;
+            }
+        }
         if (!self.config.getUseTunnel()) {
             var polling = false;
             pollForResults = setInterval(function () {
                 if (!polling) {
                     polling = true;
-                    driver.pollForEvents(platform)
+                    driver.pollForEvents(platform, skipBuster)
                     .then(function (events) {
                         for (var i = 0; i < events.length; i++) {
                             self.server.emit(events[i].eventName, events[i].eventObject);


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


Mime
View raw message