@wdio/config 8.5.5 → 8.6.0
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigParser.d.ts","sourceRoot":"","sources":["../../src/lib/ConfigParser.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAUlE,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAInE,KAAK,IAAI,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;AAK7B,UAAU,+BAAgC,SAAQ,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC;IACtF,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,YAAY,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAA;IAC9C,OAAO,EAAE,MAAM,CAAA;CAClB;AAED,UAAU,WAAY,SAAQ,IAAI,CAAC,OAAO,CAAC,+BAA+B,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7F,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACrB;AAED,MAAM,CAAC,OAAO,OAAO,YAAY;;IAQzB;;;OAGG;IACH,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,qBAAqB;IAXjC,OAAO,CAAC,OAAO,CAAiC;IAChD,OAAO,CAAC,aAAa,CAAsC;gBAGvD,cAAc,EAAE,MAAM;IACtB;;;OAGG;IACK,cAAc,GAAE,OAAO,CAAC,+BAA+B,CAAM,EAC7D,YAAY,GAAE,WAAyC,EACvD,qBA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AAY;IACpB,OAAO,CAAC,qBAAqB;IAXjC,OAAO,CAAC,OAAO,CAAiC;IAChD,OAAO,CAAC,aAAa,CAAsC;gBAGvD,cAAc,EAAE,MAAM;IACtB;;;OAGG;IACK,cAAc,GAAE,OAAO,CAAC,+BAA+B,CAAM,EAC7D,YAAY,GAAE,WAAyC,EACvD,qBAAqB,GAAE,mBAA0C;IAkB7E;;OAEG;IACG,UAAU,CAAE,MAAM,GAAE,WAAgB;IA+B1C;;;OAGG;YACW,aAAa;IAsD3B;;;OAGG;IACH,OAAO,CAAC,KAAK;IA+Cb;;;OAGG;IACH,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,KAAK;IAkClC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,UAAU,CAAC,EAAE,IAAI,EAAE;IAwD/C;;;;;;;;OAQG;IACH,0BAA0B,CAAC,cAAc,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;IA8ClE;;OAEG;IACH,SAAS;IAOT;;OAEG;IACH,eAAe,CAAC,CAAC,CAAC,EAAE,MAAM;IAY1B;;;;;;;;OAQG;IACH,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,GAAE,WAAyC,EAAE,cAAc,CAAC,EAAE,MAAM;IAkDtI;;;;;;OAMG;IACH,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;CAU/C"}
|
|
@@ -206,6 +206,7 @@ export default class ConfigParser {
|
|
|
206
206
|
*/
|
|
207
207
|
getSpecs(capSpecs, capExclude) {
|
|
208
208
|
const isSpecParamPassed = Array.isArray(this._config.spec);
|
|
209
|
+
const multiRun = this._config.multiRun;
|
|
209
210
|
// when CLI --spec is explicitly specified, this._config.specs contains the filtered
|
|
210
211
|
// specs matching the passed pattern else the specs defined inside the config are returned
|
|
211
212
|
let specs = ConfigParser.getFilePaths(this._config.specs, this._config.rootDir, this._pathService);
|
|
@@ -240,6 +241,15 @@ export default class ConfigParser {
|
|
|
240
241
|
}
|
|
241
242
|
// Remove any duplicate tests from the final specs array
|
|
242
243
|
specs = [...new Set(specs)];
|
|
244
|
+
// If the --multi-run flag is set, duplicate the specs array
|
|
245
|
+
// Ensure that when --multi-run is set that either --spec or --suite is also set
|
|
246
|
+
const hasSubsetOfSpecsDefined = isSpecParamPassed || suites.length > 0;
|
|
247
|
+
if (multiRun && hasSubsetOfSpecsDefined) {
|
|
248
|
+
specs = specs.flatMap(i => Array.from({ length: multiRun }).fill(i));
|
|
249
|
+
}
|
|
250
|
+
else if (multiRun && !hasSubsetOfSpecsDefined) {
|
|
251
|
+
throw new Error('The --multi-run flag requires that either the --spec or --suite flag is also set');
|
|
252
|
+
}
|
|
243
253
|
return this.filterSpecs(specs, exclude);
|
|
244
254
|
}
|
|
245
255
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/config",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.6.0",
|
|
4
4
|
"description": "A helper utility to parse and validate WebdriverIO options",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-config",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@wdio/logger": "8.1.0",
|
|
30
30
|
"@wdio/types": "8.4.0",
|
|
31
|
-
"@wdio/utils": "8.
|
|
31
|
+
"@wdio/utils": "8.5.6",
|
|
32
32
|
"decamelize": "^6.0.0",
|
|
33
33
|
"deepmerge-ts": "^4.2.2",
|
|
34
34
|
"glob": "^8.0.3",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"minimatch": "^7.0.0",
|
|
43
43
|
"tsconfig-paths": "^4.1.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "6493767c2eed994c0de45321aea89504d3c2f955"
|
|
46
46
|
}
|