From: Timo Tijhof Date: Fri, 20 Sep 2019 17:52:20 +0000 (+0100) Subject: selenium: Only load 'sauce' service when needed X-Git-Tag: 1.34.0-rc.0~134^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/journal.php?a=commitdiff_plain;h=e78484109ae7bd9fd8300775fcf5028b5a3bb006;p=lhc%2Fweb%2Fwiklou.git selenium: Only load 'sauce' service when needed Also, remove the redundant unprefixed `user` and `key` options. These would be cleaner to set through `sauceConnectOpts` as `sauceConnectOpts { username: …, accesskey: … }`, but even that isn't needed because wdio-sauce-service already reads these same environment variables directly. No further config needed. Also remove the duplication of default variables we don't have any particular preference for yet so that enjoy improvements to these when upgrading. Change-Id: I0d4802f83509b0b49f775560b508d9929ae9979e --- diff --git a/tests/selenium/wdio.conf.js b/tests/selenium/wdio.conf.js index 6512e7db87..72a89dd606 100644 --- a/tests/selenium/wdio.conf.js +++ b/tests/selenium/wdio.conf.js @@ -39,16 +39,8 @@ exports.config = { // Sauce Labs // ====== // See http://webdriver.io/guide/services/sauce.html - // and https://docs.saucelabs.com/reference/platforms-configurator - services: [ 'sauce' ], - user: process.env.SAUCE_USERNAME, - key: process.env.SAUCE_ACCESS_KEY, - - // Default timeout in milliseconds for Selenium Grid requests - connectionRetryTimeout: 90 * 1000, - - // Default request retries count - connectionRetryCount: 3, + // and https://github.com/bermi/sauce-connect-launcher#advanced-usage + services: process.env.SAUCE_ACCESS_KEY ? [ 'sauce' ] : [], // ================== // Test Files