@wdio/config
Advanced tools
Comparing version 5.7.8 to 5.7.13
@@ -15,13 +15,16 @@ "use strict"; | ||
// default endpoint | ||
'eu': 'eu-central-1.' | ||
'eu': 'eu-central-1.', | ||
'eu-central-1': 'eu-central-1.', | ||
'us-east-1': 'us-east1.' | ||
}; | ||
function getSauceEndpoint(region, isRDC) { | ||
const dcRegion = REGION_MAPPING[region] ? region : 'us'; | ||
function getSauceEndpoint(region, isRDC, isHeadless) { | ||
const shortRegion = REGION_MAPPING[region] ? region : 'us'; | ||
const product = isHeadless ? 'headless.' : ''; | ||
if (isRDC) { | ||
return `${dcRegion}1.appium.testobject.com`; | ||
return `${shortRegion}1.appium.testobject.com`; | ||
} | ||
return `${REGION_MAPPING[dcRegion]}saucelabs.com`; | ||
return `ondemand.${REGION_MAPPING[shortRegion]}${product}saucelabs.com`; | ||
} | ||
@@ -34,3 +37,3 @@ /** | ||
function detectBackend(options = {}, isRDC = false) { | ||
const { | ||
let { | ||
port, | ||
@@ -41,3 +44,4 @@ hostname, | ||
protocol, | ||
region | ||
region, | ||
headless | ||
} = options; | ||
@@ -77,7 +81,17 @@ /** | ||
isRDC) { | ||
// For the VM cloud a prefix needs to be added, the RDC cloud doesn't have that | ||
const preFix = isRDC ? '' : 'ondemand.'; | ||
// Sauce headless is currently only in us-east-1 | ||
const sauceRegion = headless ? 'us-east-1' : region; | ||
/** | ||
* headless runs not over SSL which might change soon | ||
* see https://wiki.saucelabs.com/display/DOCS/Sauce+Headless+Beta | ||
*/ | ||
if (headless) { | ||
protocol = 'http'; | ||
port = 4444; | ||
} | ||
return { | ||
protocol: protocol || 'https', | ||
hostname: hostname || preFix + getSauceEndpoint(region, isRDC), | ||
hostname: hostname || getSauceEndpoint(sauceRegion, isRDC, headless), | ||
port: port || 443 | ||
@@ -84,0 +98,0 @@ }; |
{ | ||
"name": "@wdio/config", | ||
"version": "5.7.8", | ||
"version": "5.7.13", | ||
"description": "A helper utility to parse and validate WebdriverIO options", | ||
@@ -40,3 +40,3 @@ "author": "Christian Bromann <christian@saucelabs.com>", | ||
}, | ||
"gitHead": "d96a4a8a313b7fd855f102af6198c60cf8475b8e" | ||
"gitHead": "06d4bc3faa3c69b35f600c1b45b7a5d3fb537130" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20863
585