@wdio/config 5.7.13 → 5.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -195,8 +195,18 @@ class ConfigParser {
195
195
  // Removing any duplicate tests that could be included
196
196
 
197
197
 
198
- const tmpSpecs = spec.length > 0 ? [...specs, ...suiteSpecs] : suiteSpecs;
199
- return [...new Set(tmpSpecs)];
198
+ let tmpSpecs = spec.length > 0 ? [...specs, ...suiteSpecs] : suiteSpecs;
199
+
200
+ if (Array.isArray(capSpecs)) {
201
+ tmpSpecs = tmpSpecs.concat(ConfigParser.getFilePaths(capSpecs));
202
+ }
203
+
204
+ if (Array.isArray(capExclude)) {
205
+ exclude = exclude.concat(ConfigParser.getFilePaths(capExclude));
206
+ }
207
+
208
+ specs = [...new Set(tmpSpecs)];
209
+ return specs.filter(spec => !exclude.includes(spec));
200
210
  }
201
211
 
202
212
  if (Array.isArray(capSpecs)) {
@@ -207,7 +217,7 @@ class ConfigParser {
207
217
  exclude = exclude.concat(ConfigParser.getFilePaths(capExclude));
208
218
  }
209
219
 
210
- return specs.filter(spec => exclude.indexOf(spec) < 0);
220
+ return specs.filter(spec => !exclude.includes(spec));
211
221
  }
212
222
  /**
213
223
  * sets config attribute with file paths from filtering
package/build/utils.js CHANGED
@@ -14,18 +14,17 @@ const REGION_MAPPING = {
14
14
  // default endpoint
15
15
  'eu': 'eu-central-1.',
16
16
  'eu-central-1': 'eu-central-1.',
17
- 'us-east-1': 'us-east1.'
17
+ 'us-east-1': 'us-east-1.'
18
18
  };
19
19
 
20
- function getSauceEndpoint(region, isRDC, isHeadless) {
20
+ function getSauceEndpoint(region, isRDC) {
21
21
  const shortRegion = REGION_MAPPING[region] ? region : 'us';
22
- const product = isHeadless ? 'headless.' : '';
23
22
 
24
23
  if (isRDC) {
25
24
  return `${shortRegion}1.appium.testobject.com`;
26
25
  }
27
26
 
28
- return `ondemand.${REGION_MAPPING[shortRegion]}${product}saucelabs.com`;
27
+ return `ondemand.${REGION_MAPPING[shortRegion]}saucelabs.com`;
29
28
  }
30
29
  /**
31
30
  * helper to detect the Selenium backend according to given capabilities
@@ -77,19 +76,9 @@ function detectBackend(options = {}, isRDC = false) {
77
76
  isRDC) {
78
77
  // Sauce headless is currently only in us-east-1
79
78
  const sauceRegion = headless ? 'us-east-1' : region;
80
- /**
81
- * headless runs not over SSL which might change soon
82
- * see https://wiki.saucelabs.com/display/DOCS/Sauce+Headless+Beta
83
- */
84
-
85
- if (headless) {
86
- protocol = 'http';
87
- port = 4444;
88
- }
89
-
90
79
  return {
91
80
  protocol: protocol || 'https',
92
- hostname: hostname || getSauceEndpoint(sauceRegion, isRDC, headless),
81
+ hostname: hostname || getSauceEndpoint(sauceRegion, isRDC),
93
82
  port: port || 443
94
83
  };
95
84
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/config",
3
- "version": "5.7.13",
3
+ "version": "5.9.1",
4
4
  "description": "A helper utility to parse and validate WebdriverIO options",
5
5
  "author": "Christian Bromann <christian@saucelabs.com>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/master/packages/wdio-config",
@@ -30,12 +30,12 @@
30
30
  "url": "https://github.com/webdriverio/webdriverio/issues"
31
31
  },
32
32
  "dependencies": {
33
- "@wdio/logger": "^5.7.8",
33
+ "@wdio/logger": "^5.9.0",
34
34
  "deepmerge": "^2.0.1",
35
35
  "glob": "^7.1.2"
36
36
  },
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "06d4bc3faa3c69b35f600c1b45b7a5d3fb537130"
40
+ "gitHead": "575883b611fde854fae80830e91417d88838aa50"
41
41
  }