@wdio/reporter 10.0.0-alpha.149 → 10.0.0-alpha.18
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/index.cjs +7 -6
- package/build/index.js +7 -6
- package/build/stats/runner.d.ts +1 -1
- package/build/supportsColor.d.ts +24 -0
- package/build/supportsColor.d.ts.map +1 -1
- package/build/types.d.ts +6 -0
- package/build/types.d.ts.map +1 -1
- package/package.json +10 -8
- package/AGENTS.md +0 -55
package/build/index.cjs
CHANGED
|
@@ -164,7 +164,8 @@ function createSupportsColor(stream, options = {}) {
|
|
|
164
164
|
return translateLevel(level);
|
|
165
165
|
}
|
|
166
166
|
var supportsColor = {
|
|
167
|
-
stdout: createSupportsColor({ isTTY: import_node_tty.default.isatty(1) })
|
|
167
|
+
stdout: createSupportsColor({ isTTY: import_node_tty.default.isatty(1) }),
|
|
168
|
+
stderr: createSupportsColor({ isTTY: import_node_tty.default.isatty(2) })
|
|
168
169
|
};
|
|
169
170
|
var supportsColor_default = supportsColor;
|
|
170
171
|
|
|
@@ -208,15 +209,15 @@ function sanitizeCaps(caps) {
|
|
|
208
209
|
let result;
|
|
209
210
|
result = caps["appium:deviceName"] || caps.deviceName ? [
|
|
210
211
|
sanitizeString(caps.platformName),
|
|
211
|
-
// @ts-expect-error
|
|
212
|
+
// @ts-expect-error outdated JSONWP capabilities
|
|
212
213
|
sanitizeString(caps["appium:deviceName"] || caps.deviceName),
|
|
213
214
|
sanitizeString(caps["appium:platformVersion"]),
|
|
214
215
|
sanitizeString(caps["appium:app"])
|
|
215
216
|
] : [
|
|
216
217
|
sanitizeString(caps.browserName),
|
|
217
|
-
// @ts-expect-error
|
|
218
|
+
// @ts-expect-error outdated JSONWP capabilities
|
|
218
219
|
sanitizeString(caps.version || caps.browserVersion),
|
|
219
|
-
// @ts-expect-error
|
|
220
|
+
// @ts-expect-error outdated JSONWP capabilities
|
|
220
221
|
sanitizeString(caps.platform || caps.platformName),
|
|
221
222
|
sanitizeString(caps["appium:app"])
|
|
222
223
|
];
|
|
@@ -458,7 +459,7 @@ var RunnerStats = class extends RunnableStats {
|
|
|
458
459
|
config;
|
|
459
460
|
specs;
|
|
460
461
|
sessionId;
|
|
461
|
-
|
|
462
|
+
isMultiremote;
|
|
462
463
|
instanceOptions;
|
|
463
464
|
retry;
|
|
464
465
|
failures;
|
|
@@ -472,7 +473,7 @@ var RunnerStats = class extends RunnableStats {
|
|
|
472
473
|
this.config = runner.config;
|
|
473
474
|
this.specs = runner.specs;
|
|
474
475
|
this.sessionId = runner.sessionId;
|
|
475
|
-
this.
|
|
476
|
+
this.isMultiremote = runner.isMultiremote;
|
|
476
477
|
this.instanceOptions = runner.instanceOptions;
|
|
477
478
|
this.retry = runner.retry;
|
|
478
479
|
}
|
package/build/index.js
CHANGED
|
@@ -124,7 +124,8 @@ function createSupportsColor(stream, options = {}) {
|
|
|
124
124
|
return translateLevel(level);
|
|
125
125
|
}
|
|
126
126
|
var supportsColor = {
|
|
127
|
-
stdout: createSupportsColor({ isTTY: tty.isatty(1) })
|
|
127
|
+
stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
|
|
128
|
+
stderr: createSupportsColor({ isTTY: tty.isatty(2) })
|
|
128
129
|
};
|
|
129
130
|
var supportsColor_default = supportsColor;
|
|
130
131
|
|
|
@@ -168,15 +169,15 @@ function sanitizeCaps(caps) {
|
|
|
168
169
|
let result;
|
|
169
170
|
result = caps["appium:deviceName"] || caps.deviceName ? [
|
|
170
171
|
sanitizeString(caps.platformName),
|
|
171
|
-
// @ts-expect-error
|
|
172
|
+
// @ts-expect-error outdated JSONWP capabilities
|
|
172
173
|
sanitizeString(caps["appium:deviceName"] || caps.deviceName),
|
|
173
174
|
sanitizeString(caps["appium:platformVersion"]),
|
|
174
175
|
sanitizeString(caps["appium:app"])
|
|
175
176
|
] : [
|
|
176
177
|
sanitizeString(caps.browserName),
|
|
177
|
-
// @ts-expect-error
|
|
178
|
+
// @ts-expect-error outdated JSONWP capabilities
|
|
178
179
|
sanitizeString(caps.version || caps.browserVersion),
|
|
179
|
-
// @ts-expect-error
|
|
180
|
+
// @ts-expect-error outdated JSONWP capabilities
|
|
180
181
|
sanitizeString(caps.platform || caps.platformName),
|
|
181
182
|
sanitizeString(caps["appium:app"])
|
|
182
183
|
];
|
|
@@ -418,7 +419,7 @@ var RunnerStats = class extends RunnableStats {
|
|
|
418
419
|
config;
|
|
419
420
|
specs;
|
|
420
421
|
sessionId;
|
|
421
|
-
|
|
422
|
+
isMultiremote;
|
|
422
423
|
instanceOptions;
|
|
423
424
|
retry;
|
|
424
425
|
failures;
|
|
@@ -432,7 +433,7 @@ var RunnerStats = class extends RunnableStats {
|
|
|
432
433
|
this.config = runner.config;
|
|
433
434
|
this.specs = runner.specs;
|
|
434
435
|
this.sessionId = runner.sessionId;
|
|
435
|
-
this.
|
|
436
|
+
this.isMultiremote = runner.isMultiremote;
|
|
436
437
|
this.instanceOptions = runner.instanceOptions;
|
|
437
438
|
this.retry = runner.retry;
|
|
438
439
|
}
|
package/build/stats/runner.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export default class RunnerStats extends RunnableStats {
|
|
|
11
11
|
config: Options.Testrunner;
|
|
12
12
|
specs: string[];
|
|
13
13
|
sessionId: string;
|
|
14
|
-
|
|
14
|
+
isMultiremote: boolean;
|
|
15
15
|
instanceOptions: Record<string, Options.WebdriverIO>;
|
|
16
16
|
retry?: number;
|
|
17
17
|
failures?: number;
|
package/build/supportsColor.d.ts
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
3
3
|
*
|
|
4
4
|
* This file was imported due to lacking support of CJS environments in the original package.
|
|
5
5
|
*/
|
|
6
|
+
interface Options {
|
|
7
|
+
/**
|
|
8
|
+
* By default it is `true`, which instructs `supportsColor()` to sniff `process.argv`
|
|
9
|
+
* for the multitude of `--color` flags (see _Info_ below).
|
|
10
|
+
* If `false`, then `process.argv` is not considered when determining color support.
|
|
11
|
+
* @default true
|
|
12
|
+
*/
|
|
13
|
+
sniffFlags?: boolean | undefined;
|
|
14
|
+
isTTY?: boolean | undefined;
|
|
15
|
+
}
|
|
16
|
+
export declare function createSupportsColor(stream: {
|
|
17
|
+
isTTY?: boolean;
|
|
18
|
+
}, options?: Options): false | {
|
|
19
|
+
level: number;
|
|
20
|
+
hasBasic: boolean;
|
|
21
|
+
has256: boolean;
|
|
22
|
+
has16m: boolean;
|
|
23
|
+
};
|
|
6
24
|
declare const supportsColor: {
|
|
7
25
|
stdout: boolean | {
|
|
8
26
|
level: number;
|
|
@@ -10,6 +28,12 @@ declare const supportsColor: {
|
|
|
10
28
|
has256: boolean;
|
|
11
29
|
has16m: boolean;
|
|
12
30
|
};
|
|
31
|
+
stderr: boolean | {
|
|
32
|
+
level: number;
|
|
33
|
+
hasBasic: boolean;
|
|
34
|
+
has256: boolean;
|
|
35
|
+
has16m: boolean;
|
|
36
|
+
};
|
|
13
37
|
};
|
|
14
38
|
export default supportsColor;
|
|
15
39
|
//# sourceMappingURL=supportsColor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supportsColor.d.ts","sourceRoot":"","sources":["../src/supportsColor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"supportsColor.d.ts","sourceRoot":"","sources":["../src/supportsColor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAeH,UAAU,OAAO;IACb;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/B;AA4JD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,EAAE,OAAO,GAAE,OAAY;;;;;EAOrF;AAED,QAAA,MAAM,aAAa;;;;;;;;;;;;;CAGlB,CAAA;AAED,eAAe,aAAa,CAAA"}
|
package/build/types.d.ts
CHANGED
|
@@ -18,6 +18,12 @@ export interface BeforeCommandArgs extends CommandArgs {
|
|
|
18
18
|
}
|
|
19
19
|
export interface AfterCommandArgs extends CommandArgs {
|
|
20
20
|
result: unknown;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Use `command` instead, moreover since the `onAfterCommand` was never called in the case of custom commands, it was breaking reports, and we do not emit this one in the fix!
|
|
23
|
+
*
|
|
24
|
+
* custom commands also send along the command name
|
|
25
|
+
*/
|
|
26
|
+
name?: string;
|
|
21
27
|
}
|
|
22
28
|
export interface Argument {
|
|
23
29
|
rows?: {
|
package/build/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IAClD,IAAI,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACjD,MAAM,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IAClD,IAAI,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACjD,MAAM,EAAE,OAAO,CAAA;IAEf;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,QAAQ;IACrB,IAAI,CAAC,EAAE;QACH,KAAK,EAAE,MAAM,EAAE,CAAA;KAClB,EAAE,CAAA;CACN"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/reporter",
|
|
3
|
-
"version": "10.0.0-alpha.
|
|
3
|
+
"version": "10.0.0-alpha.18+dbf0f4971",
|
|
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",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"engines": {
|
|
9
|
-
"node": ">=
|
|
9
|
+
"node": ">=18.20.0"
|
|
10
10
|
},
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
@@ -35,18 +35,20 @@
|
|
|
35
35
|
"require": "./build/index.cjs"
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
|
-
"typeScriptVersion": "
|
|
38
|
+
"typeScriptVersion": "3.8.3",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@types/node": "^
|
|
41
|
-
"@wdio/
|
|
42
|
-
"
|
|
40
|
+
"@types/node": "^20.1.0",
|
|
41
|
+
"@wdio/logger": "10.0.0-alpha.18+dbf0f4971",
|
|
42
|
+
"@wdio/types": "10.0.0-alpha.18+dbf0f4971",
|
|
43
|
+
"diff": "^8.0.2",
|
|
43
44
|
"object-inspect": "^1.12.0"
|
|
44
45
|
},
|
|
45
46
|
"devDependencies": {
|
|
46
47
|
"@types/diff": "^8.0.0",
|
|
47
48
|
"@types/object-inspect": "^1.8.1",
|
|
49
|
+
"@types/supports-color": "^8.1.1",
|
|
48
50
|
"@types/tmp": "^0.2.3",
|
|
49
|
-
"tmp": "^0.2.
|
|
51
|
+
"tmp": "^0.2.1"
|
|
50
52
|
},
|
|
51
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "dbf0f497130676040ce4212d9cf6459adfe16c42"
|
|
52
54
|
}
|
package/AGENTS.md
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# @wdio/reporter
|
|
2
|
-
|
|
3
|
-
Base class for reporters. Concrete reporters (`wdio-spec-reporter`,
|
|
4
|
-
`wdio-junit-reporter`, …) extend this package.
|
|
5
|
-
|
|
6
|
-
## When to edit which package
|
|
7
|
-
|
|
8
|
-
| Change | Package |
|
|
9
|
-
|--------|---------|
|
|
10
|
-
| Runner events, output path, base lifecycle | `@wdio/reporter` |
|
|
11
|
-
| Spec / JUnit / Allure / … formatting | that reporter package |
|
|
12
|
-
| How the runner constructs reporters | `@wdio/runner` |
|
|
13
|
-
|
|
14
|
-
## Commands
|
|
15
|
-
|
|
16
|
-
```sh
|
|
17
|
-
pnpm run test:package wdio-reporter
|
|
18
|
-
pnpm run test:package wdio-spec-reporter
|
|
19
|
-
pnpm run test:smoke customReporterString
|
|
20
|
-
pnpm run test:smoke customReporterObject
|
|
21
|
-
pnpm run test:smoke reporterTestrunner
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
User-facing reporter docs are the package `README.md`, ingested by
|
|
25
|
-
`infra/docs/src/packagesDocs.ts`.
|
|
26
|
-
|
|
27
|
-
## Guardrails
|
|
28
|
-
|
|
29
|
-
- New reporters: `pnpm run create` and extend `@wdio/reporter`.
|
|
30
|
-
- Do not reach into `@wdio/runner` internals from a reporter. Consume the
|
|
31
|
-
documented event API only.
|
|
32
|
-
- Smoke tests are the right proof for constructor / CLI string vs object
|
|
33
|
-
config; unit tests are enough for formatting helpers.
|
|
34
|
-
|
|
35
|
-
## Spec reporter test ownership
|
|
36
|
-
|
|
37
|
-
`packages/wdio-spec-reporter/tests/index.test.ts` owns spec formatting.
|
|
38
|
-
Assert the written report. Do not lock private flags or `printCurrentStats`
|
|
39
|
-
call shape.
|
|
40
|
-
|
|
41
|
-
- `showPreface: false`, `onlyFailures`, and `sauceLabsSharableLinks: false`
|
|
42
|
-
must attach suites before asserting `write()`. Sauce job links also need
|
|
43
|
-
`runnerStat.instanceOptions`. An empty `write()` call list does not prove
|
|
44
|
-
the option. Default preface text belongs to the existing `printReport`
|
|
45
|
-
snapshots.
|
|
46
|
-
- Console-log filtering goes through the patched `stdout.write`. Assigning
|
|
47
|
-
`_consoleOutput` does not exercise the `mwebdriver` exclusion.
|
|
48
|
-
- Realtime reporting is the `reporterRealTime` payload on `process.send`.
|
|
49
|
-
The unit-test env var `WDIO_UNIT_TESTS` suppresses that send, so a test
|
|
50
|
-
of the payload has to unset it and restore it.
|
|
51
|
-
- `getHeaderDisplay` does not print spec paths.
|
|
52
|
-
- Default symbols and pass/fail/skip colors belong to the printed report.
|
|
53
|
-
Custom `symbols` belong on that same report. Keep the multi-remote
|
|
54
|
-
instance name `"app"`: combo formatting throws if that name is read as
|
|
55
|
-
an app capability.
|