From 80dd75ba9ab3b6fa86bdf874798f9fcc8ffa2e67 Mon Sep 17 00:00:00 2001 From: "JiaLi.Passion" Date: Thu, 14 Sep 2017 08:58:09 +0900 Subject: [PATCH] disable SL_IOS9 --- karma-dist-sauce-jasmine.conf.js | 2 +- sauce.conf.js | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/karma-dist-sauce-jasmine.conf.js b/karma-dist-sauce-jasmine.conf.js index 401ac3b71..44f6be74a 100644 --- a/karma-dist-sauce-jasmine.conf.js +++ b/karma-dist-sauce-jasmine.conf.js @@ -8,5 +8,5 @@ module.exports = function (config) { require('./karma-dist-jasmine.conf.js')(config); - require('./sauce.conf')(config); + require('./sauce.conf')(config, ['SL_IOS9']); }; diff --git a/sauce.conf.js b/sauce.conf.js index d1c0393b0..a6026ad50 100644 --- a/sauce.conf.js +++ b/sauce.conf.js @@ -1,10 +1,10 @@ // Sauce configuration -module.exports = function (config) { +module.exports = function (config, ignoredLaunchers) { // The WS server is not available with Sauce config.files.unshift('test/saucelabs.js'); - var customLaunchers = { + var basicLaunchers = { 'SL_CHROME': { base: 'SauceLabs', browserName: 'chrome', @@ -153,6 +153,17 @@ module.exports = function (config) { } }; + var customLaunchers = {}; + if (!ignoredLaunchers) { + customLaunchers = basicLaunchers; + } else { + Object.keys(basicLaunchers).forEach(function(key) { + if (ignoredLaunchers.filter(function(ignore) {return ignore === key;}).length === 0) { + customLaunchers[key] = basicLaunchers[key]; + } + }); + } + config.set({ captureTimeout: 120000, browserNoActivityTimeout: 240000,