@wdio/reporter 9.2.2 → 9.4.2
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/README.md +26 -0
- package/build/index.cjs +19 -0
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +19 -0
- package/build/stats/suite.d.ts +6 -0
- package/build/stats/suite.d.ts.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -178,6 +178,32 @@ SuiteStats {
|
|
|
178
178
|
end: '2018-02-09T13:30:41.609Z' } }
|
|
179
179
|
```
|
|
180
180
|
|
|
181
|
+
##### onSuiteRetry
|
|
182
|
+
|
|
183
|
+
(Cucumber only)
|
|
184
|
+
|
|
185
|
+
```js
|
|
186
|
+
SuiteStats {
|
|
187
|
+
start: 2024-11-13T06:33:21.499Z,
|
|
188
|
+
end: undefined,
|
|
189
|
+
type: 'scenario',
|
|
190
|
+
uid: '0',
|
|
191
|
+
cid: '0-0',
|
|
192
|
+
file: '/Users/christian.bromann/Sites/WebdriverIO/projects/webdriverio/examples/wdio/cucumber/features/my-feature.feature',
|
|
193
|
+
title: 'Get size of an element',
|
|
194
|
+
fullTitle: 'my-feature.feature:1:1: Get size of an element',
|
|
195
|
+
tags: [],
|
|
196
|
+
tests: [],
|
|
197
|
+
hooks: [],
|
|
198
|
+
suites: [],
|
|
199
|
+
parent: 'my-feature.feature:1:1',
|
|
200
|
+
retries: 1,
|
|
201
|
+
hooksAndTests: [],
|
|
202
|
+
description: '',
|
|
203
|
+
rule: undefined
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
181
207
|
##### onHookStart
|
|
182
208
|
|
|
183
209
|
```js
|
package/build/index.cjs
CHANGED
|
@@ -301,6 +301,7 @@ var SuiteStats = class extends RunnableStats {
|
|
|
301
301
|
hooks = [];
|
|
302
302
|
suites = [];
|
|
303
303
|
parent;
|
|
304
|
+
retries = 0;
|
|
304
305
|
/**
|
|
305
306
|
* an array of hooks and tests stored in order as they happen
|
|
306
307
|
*/
|
|
@@ -319,6 +320,15 @@ var SuiteStats = class extends RunnableStats {
|
|
|
319
320
|
this.description = suite.description;
|
|
320
321
|
this.rule = suite.rule;
|
|
321
322
|
}
|
|
323
|
+
/**
|
|
324
|
+
* Mark suite as retried and remove previous history.
|
|
325
|
+
*/
|
|
326
|
+
retry() {
|
|
327
|
+
this.retries++;
|
|
328
|
+
this.tests = [];
|
|
329
|
+
this.hooks = [];
|
|
330
|
+
this.hooksAndTests = [];
|
|
331
|
+
}
|
|
322
332
|
};
|
|
323
333
|
|
|
324
334
|
// src/stats/hook.ts
|
|
@@ -515,6 +525,11 @@ var WDIOReporter = class extends import_node_events.EventEmitter {
|
|
|
515
525
|
this.onSuiteStart(suite);
|
|
516
526
|
}
|
|
517
527
|
);
|
|
528
|
+
this.on("suite:retry", (suite) => {
|
|
529
|
+
const suiteStat = this.suites[suite.uid];
|
|
530
|
+
suiteStat.retry();
|
|
531
|
+
this.onSuiteRetry(suiteStat);
|
|
532
|
+
});
|
|
518
533
|
this.on(
|
|
519
534
|
"hook:start",
|
|
520
535
|
/* istanbul ignore next */
|
|
@@ -768,6 +783,10 @@ var WDIOReporter = class extends import_node_events.EventEmitter {
|
|
|
768
783
|
}
|
|
769
784
|
/* istanbul ignore next */
|
|
770
785
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
786
|
+
onSuiteRetry(suiteStats) {
|
|
787
|
+
}
|
|
788
|
+
/* istanbul ignore next */
|
|
789
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
771
790
|
onSuiteEnd(suiteStats) {
|
|
772
791
|
}
|
|
773
792
|
/* istanbul ignore next */
|
package/build/index.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ export default class WDIOReporter extends EventEmitter {
|
|
|
54
54
|
onTestRetry(testStats: TestStats): void;
|
|
55
55
|
onTestSkip(testStats: TestStats): void;
|
|
56
56
|
onTestEnd(testStats: TestStats): void;
|
|
57
|
+
onSuiteRetry(suiteStats: SuiteStats): void;
|
|
57
58
|
onSuiteEnd(suiteStats: SuiteStats): void;
|
|
58
59
|
onRunnerEnd(runnerStats: RunnerStats): void;
|
|
59
60
|
}
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAW,MAAM,aAAa,CAAA;AAIrD,OAAO,UAAU,MAAM,kBAAkB,CAAA;AAEzC,OAAO,SAAS,MAAM,iBAAiB,CAAA;AACvC,OAAO,SAAS,EAAE,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,WAAW,MAAM,mBAAmB,CAAA;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,WAAW,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAEjG,KAAK,iBAAiB,GAAG;IAAE,KAAK,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAA;CAAE,CAAA;AAE7D,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,YAAY;IAqB/B,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC;IApBtD,YAAY,EAAE,WAAW,GAAG,iBAAiB,CAAA;IAC7C,QAAQ,SAAI;IACZ,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAK;IACvC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAK;IACrC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAI;IACpC,aAAa,EAAE,UAAU,EAAE,CAAK;IAChC,MAAM;;;;;;;MAOL;IACD,OAAO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
|
265
266
|
/**
|
|
266
267
|
* an array of hooks and tests stored in order as they happen
|
|
267
268
|
*/
|
|
@@ -280,6 +281,15 @@ var SuiteStats = class extends RunnableStats {
|
|
|
280
281
|
this.description = suite.description;
|
|
281
282
|
this.rule = suite.rule;
|
|
282
283
|
}
|
|
284
|
+
/**
|
|
285
|
+
* Mark suite as retried and remove previous history.
|
|
286
|
+
*/
|
|
287
|
+
retry() {
|
|
288
|
+
this.retries++;
|
|
289
|
+
this.tests = [];
|
|
290
|
+
this.hooks = [];
|
|
291
|
+
this.hooksAndTests = [];
|
|
292
|
+
}
|
|
283
293
|
};
|
|
284
294
|
|
|
285
295
|
// src/stats/hook.ts
|
|
@@ -476,6 +486,11 @@ var WDIOReporter = class extends EventEmitter {
|
|
|
476
486
|
this.onSuiteStart(suite);
|
|
477
487
|
}
|
|
478
488
|
);
|
|
489
|
+
this.on("suite:retry", (suite) => {
|
|
490
|
+
const suiteStat = this.suites[suite.uid];
|
|
491
|
+
suiteStat.retry();
|
|
492
|
+
this.onSuiteRetry(suiteStat);
|
|
493
|
+
});
|
|
479
494
|
this.on(
|
|
480
495
|
"hook:start",
|
|
481
496
|
/* istanbul ignore next */
|
|
@@ -729,6 +744,10 @@ var WDIOReporter = class extends EventEmitter {
|
|
|
729
744
|
}
|
|
730
745
|
/* istanbul ignore next */
|
|
731
746
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
747
|
+
onSuiteRetry(suiteStats) {
|
|
748
|
+
}
|
|
749
|
+
/* istanbul ignore next */
|
|
750
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
732
751
|
onSuiteEnd(suiteStats) {
|
|
733
752
|
}
|
|
734
753
|
/* istanbul ignore next */
|
package/build/stats/suite.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export interface Suite {
|
|
|
16
16
|
tags?: string[] | Tag[];
|
|
17
17
|
description?: string;
|
|
18
18
|
rule?: string;
|
|
19
|
+
retries?: number;
|
|
19
20
|
}
|
|
20
21
|
/**
|
|
21
22
|
* Class describing statistics about a single suite.
|
|
@@ -31,6 +32,7 @@ export default class SuiteStats extends RunnableStats {
|
|
|
31
32
|
hooks: HookStats[];
|
|
32
33
|
suites: SuiteStats[];
|
|
33
34
|
parent?: string;
|
|
35
|
+
retries: number;
|
|
34
36
|
/**
|
|
35
37
|
* an array of hooks and tests stored in order as they happen
|
|
36
38
|
*/
|
|
@@ -38,5 +40,9 @@ export default class SuiteStats extends RunnableStats {
|
|
|
38
40
|
description?: string;
|
|
39
41
|
rule?: string;
|
|
40
42
|
constructor(suite: Suite);
|
|
43
|
+
/**
|
|
44
|
+
* Mark suite as retried and remove previous history.
|
|
45
|
+
*/
|
|
46
|
+
retry(): void;
|
|
41
47
|
}
|
|
42
48
|
//# sourceMappingURL=suite.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suite.d.ts","sourceRoot":"","sources":["../../src/stats/suite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,WAAW,CAAA;AACtC,OAAO,aAAa,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,SAAS,MAAM,WAAW,CAAA;AACtC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AAEtC,MAAM,WAAW,KAAK;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,EAAE,CAAA;IACvB,WAAW,CAAC,EAAE,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ACzB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,SAAI;IACX;;OAEG;IACH,aAAa,EAAE,CAAC,SAAS,GAAG,SAAS,CAAC,EAAE,CAAK;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;gBAEA,KAAK,EAAE,KAAK;IAgBzB;;OAEG;IACH,KAAK;CAMR"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/reporter",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.4.2",
|
|
4
4
|
"description": "A WebdriverIO utility to help reporting all events",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-reporter",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@types/node": "^20.1.0",
|
|
41
41
|
"@wdio/logger": "9.1.3",
|
|
42
|
-
"@wdio/types": "9.
|
|
42
|
+
"@wdio/types": "9.4.2",
|
|
43
43
|
"diff": "^7.0.0",
|
|
44
44
|
"object-inspect": "^1.12.0"
|
|
45
45
|
},
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"@types/tmp": "^0.2.3",
|
|
51
51
|
"tmp": "^0.2.1"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "e42d3e8d6958fd9a734fe1d9a9768357b6045893"
|
|
54
54
|
}
|