@wdio/runner 8.0.2 → 8.0.4
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.
- package/build/browser.d.ts.map +1 -1
- package/build/browser.js +16 -3
- package/package.json +5 -5
package/build/browser.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAW,MAAM,aAAa,CAAA;AAExD,OAAO,KAAK,YAAY,MAAM,YAAY,CAAA;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAK5C,KAAK,cAAc,GAAG,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,CAAC,CAAA;AAE9D,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,cAAc,EAAE,cAAc,EAAE,CAAA;QAChC,cAAc,EAAE,GAAG,EAAE,CAAA;QACrB,gBAAgB,EAAE,MAAM,CAAA;KAC3B;CACJ;AAID,MAAM,CAAC,OAAO,OAAO,gBAAiB,YAAW,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC;;IAIpE,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,SAAS;gBAJT,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,EAC/B,MAAM,EAAE,MAAM,EAAE,EAChB,aAAa,EAAE,YAAY,CAAC,gBAAgB,EAC5C,SAAS,EAAE,YAAY;IAMnC;;OAEG;IACH,QAAQ;IAIR,IAAI;IAIE,GAAG;IA0GT,MAAM,CAAC,IAAI,CAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,YAAY,CAAC,gBAAgB,EAAE,QAAQ,EAAE,YAAY;CAItH"}
|
package/build/browser.js
CHANGED
|
@@ -11,12 +11,15 @@ export default class BrowserFramework {
|
|
|
11
11
|
_specs;
|
|
12
12
|
_capabilities;
|
|
13
13
|
_reporter;
|
|
14
|
+
#inDebugMode = false;
|
|
14
15
|
constructor(_cid, _config, _specs, _capabilities, _reporter) {
|
|
15
16
|
this._cid = _cid;
|
|
16
17
|
this._config = _config;
|
|
17
18
|
this._specs = _specs;
|
|
18
19
|
this._capabilities = _capabilities;
|
|
19
20
|
this._reporter = _reporter;
|
|
21
|
+
// listen on debug state switches
|
|
22
|
+
process.on('message', this.#switchDebugState.bind(this));
|
|
20
23
|
}
|
|
21
24
|
/**
|
|
22
25
|
* always return true as it is unrelevant for component testing
|
|
@@ -42,6 +45,7 @@ export default class BrowserFramework {
|
|
|
42
45
|
* start tests
|
|
43
46
|
*/
|
|
44
47
|
let failures = 0;
|
|
48
|
+
let uid = 0;
|
|
45
49
|
for (const spec of this._specs) {
|
|
46
50
|
log.info(`Run spec file ${spec} for cid ${this._cid}`);
|
|
47
51
|
/**
|
|
@@ -71,11 +75,11 @@ export default class BrowserFramework {
|
|
|
71
75
|
failures += 1;
|
|
72
76
|
continue;
|
|
73
77
|
}
|
|
74
|
-
failures += await this.#fetchEvents(browser, spec);
|
|
78
|
+
failures += await this.#fetchEvents(browser, spec, ++uid);
|
|
75
79
|
}
|
|
76
80
|
return failures;
|
|
77
81
|
}
|
|
78
|
-
async #fetchEvents(browser, spec) {
|
|
82
|
+
async #fetchEvents(browser, spec, uid) {
|
|
79
83
|
/**
|
|
80
84
|
* wait until tests have finished and results are emitted to the window scope
|
|
81
85
|
*/
|
|
@@ -83,6 +87,12 @@ export default class BrowserFramework {
|
|
|
83
87
|
await browser.waitUntil(async () => {
|
|
84
88
|
while (typeof failures !== 'number') {
|
|
85
89
|
await sleep();
|
|
90
|
+
/**
|
|
91
|
+
* don't fetch events if user has called debug command
|
|
92
|
+
*/
|
|
93
|
+
if (this.#inDebugMode) {
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
86
96
|
failures = await browser?.execute(() => (window.__wdioEvents__.length > 0
|
|
87
97
|
? window.__wdioFailures__
|
|
88
98
|
: null));
|
|
@@ -103,12 +113,15 @@ export default class BrowserFramework {
|
|
|
103
113
|
this._reporter.emit(ev.type, {
|
|
104
114
|
...ev,
|
|
105
115
|
file: spec,
|
|
106
|
-
uid: this._cid
|
|
116
|
+
uid: `${this._cid}-${uid}`,
|
|
107
117
|
cid: this._cid
|
|
108
118
|
});
|
|
109
119
|
}
|
|
110
120
|
return failures;
|
|
111
121
|
}
|
|
122
|
+
#switchDebugState(cmd) {
|
|
123
|
+
this.#inDebugMode = cmd.args;
|
|
124
|
+
}
|
|
112
125
|
static init(cid, config, specs, caps, reporter) {
|
|
113
126
|
const framework = new BrowserFramework(cid, config, specs, caps, reporter);
|
|
114
127
|
return framework;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/runner",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.4",
|
|
4
4
|
"description": "A WebdriverIO service that runs tests in arbitrary environments",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-runner",
|
|
@@ -27,18 +27,18 @@
|
|
|
27
27
|
"typeScriptVersion": "3.8.3",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@wdio/config": "8.0.2",
|
|
30
|
-
"@wdio/globals": "8.0.
|
|
30
|
+
"@wdio/globals": "8.0.4",
|
|
31
31
|
"@wdio/logger": "8.0.0",
|
|
32
32
|
"@wdio/types": "8.0.0",
|
|
33
33
|
"@wdio/utils": "8.0.2",
|
|
34
34
|
"deepmerge-ts": "^4.2.2",
|
|
35
|
-
"expect-webdriverio": "^4.0.
|
|
35
|
+
"expect-webdriverio": "^4.0.1",
|
|
36
36
|
"gaze": "^1.1.2",
|
|
37
37
|
"webdriver": "8.0.2",
|
|
38
|
-
"webdriverio": "8.0.
|
|
38
|
+
"webdriverio": "8.0.4"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "3e59b46e07fe878dd9ff57d746f698edcb13d94f"
|
|
44
44
|
}
|