@empiricalrun/playwright-utils 0.28.6 → 0.28.8
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/CHANGELOG.md +42 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +1 -6
- package/dist/playwright-extensions.d.ts.map +1 -1
- package/dist/reporter/empirical-reporter.d.ts +1 -1
- package/dist/reporter/empirical-reporter.d.ts.map +1 -1
- package/dist/reporter/empirical-reporter.js +12 -8
- package/dist/reporter/util.d.ts +1 -18
- package/dist/reporter/util.d.ts.map +1 -1
- package/dist/reporter/util.js +0 -17
- package/package.json +5 -5
- package/playwright.config.ts +7 -4
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/reporter/base.d.ts +0 -41
- package/dist/reporter/base.d.ts.map +0 -1
- package/dist/reporter/base.js +0 -177
- package/dist/reporter/custom.d.ts +0 -72
- package/dist/reporter/custom.d.ts.map +0 -1
- package/dist/reporter/custom.js +0 -824
- package/dist/reporter/reporterV2.d.ts +0 -36
- package/dist/reporter/reporterV2.d.ts.map +0 -1
- package/dist/reporter/reporterV2.js +0 -19
- package/dist/reporter/third_party/html-reporter-types.d.ts +0 -107
- package/dist/reporter/third_party/html-reporter-types.d.ts.map +0 -1
- package/dist/reporter/third_party/html-reporter-types.js +0 -18
- package/eslint.config.mjs +0 -23
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Original file: https://github.com/microsoft/playwright/blob/cf8c14f884b6f24966350a5f49b1580c3e183d21/packages/playwright/src/reporters/reporterV2.ts
|
|
3
|
-
* Copyright (c) Microsoft Corporation.
|
|
4
|
-
* Modifications copyright (c) Forge AI Private Limited
|
|
5
|
-
*
|
|
6
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
* you may not use this file except in compliance with the License.
|
|
8
|
-
* You may obtain a copy of the License at
|
|
9
|
-
*
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
-
* See the License for the specific language governing permissions and
|
|
16
|
-
* limitations under the License.
|
|
17
|
-
*/
|
|
18
|
-
import type { FullConfig, FullResult, Suite, TestCase, TestError, TestResult, TestStep } from "@playwright/test/reporter";
|
|
19
|
-
export interface ReporterV2 {
|
|
20
|
-
onConfigure(config: FullConfig): void;
|
|
21
|
-
onBegin(suite: Suite): void;
|
|
22
|
-
onTestBegin(test: TestCase, result: TestResult): void;
|
|
23
|
-
onStdOut(chunk: string | Buffer, test?: TestCase, result?: TestResult): void;
|
|
24
|
-
onStdErr(chunk: string | Buffer, test?: TestCase, result?: TestResult): void;
|
|
25
|
-
onTestEnd(test: TestCase, result: TestResult): void;
|
|
26
|
-
onEnd(result: FullResult): Promise<{
|
|
27
|
-
status?: FullResult["status"];
|
|
28
|
-
} | undefined | void> | void;
|
|
29
|
-
onExit(): void | Promise<void>;
|
|
30
|
-
onError(error: TestError): void;
|
|
31
|
-
onStepBegin(test: TestCase, result: TestResult, step: TestStep): void;
|
|
32
|
-
onStepEnd(test: TestCase, result: TestResult, step: TestStep): void;
|
|
33
|
-
printsToStdio(): boolean;
|
|
34
|
-
version(): "v2";
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=reporterV2.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reporterV2.d.ts","sourceRoot":"","sources":["../../src/reporter/reporterV2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACV,KAAK,EACL,QAAQ,EACR,SAAS,EACT,UAAU,EACV,QAAQ,EACT,MAAM,2BAA2B,CAAC;AAEnC,MAAM,WAAW,UAAU;IACzB,WAAW,CAAC,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
|
-
* Copyright (c) Microsoft Corporation.
|
|
5
|
-
* Modifications copyright (c) Forge AI Private Limited
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Original file: https://github.com/microsoft/playwright/blob/cf8c14f884b6f24966350a5f49b1580c3e183d21/packages/html-reporter/src/types.ts
|
|
3
|
-
* Copyright (c) Microsoft Corporation.
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import type { Metadata } from '@playwright/test';
|
|
18
|
-
export type Stats = {
|
|
19
|
-
total: number;
|
|
20
|
-
expected: number;
|
|
21
|
-
unexpected: number;
|
|
22
|
-
flaky: number;
|
|
23
|
-
skipped: number;
|
|
24
|
-
ok: boolean;
|
|
25
|
-
};
|
|
26
|
-
export type FilteredStats = {
|
|
27
|
-
total: number;
|
|
28
|
-
duration: number;
|
|
29
|
-
};
|
|
30
|
-
export type Location = {
|
|
31
|
-
file: string;
|
|
32
|
-
line: number;
|
|
33
|
-
column: number;
|
|
34
|
-
};
|
|
35
|
-
export type HTMLReport = {
|
|
36
|
-
metadata: Metadata;
|
|
37
|
-
files: TestFileSummary[];
|
|
38
|
-
stats: Stats;
|
|
39
|
-
projectNames: string[];
|
|
40
|
-
startTime: number;
|
|
41
|
-
duration: number;
|
|
42
|
-
errors: string[];
|
|
43
|
-
};
|
|
44
|
-
export type TestFile = {
|
|
45
|
-
fileId: string;
|
|
46
|
-
fileName: string;
|
|
47
|
-
tests: TestCase[];
|
|
48
|
-
};
|
|
49
|
-
export type TestFileSummary = {
|
|
50
|
-
fileId: string;
|
|
51
|
-
fileName: string;
|
|
52
|
-
tests: TestCaseSummary[];
|
|
53
|
-
stats: Stats;
|
|
54
|
-
};
|
|
55
|
-
export type TestCaseAnnotation = {
|
|
56
|
-
type: string;
|
|
57
|
-
description?: string;
|
|
58
|
-
};
|
|
59
|
-
export type TestCaseSummary = {
|
|
60
|
-
testId: string;
|
|
61
|
-
title: string;
|
|
62
|
-
path: string[];
|
|
63
|
-
projectName: string;
|
|
64
|
-
location: Location;
|
|
65
|
-
annotations: TestCaseAnnotation[];
|
|
66
|
-
tags: string[];
|
|
67
|
-
outcome: 'skipped' | 'expected' | 'unexpected' | 'flaky';
|
|
68
|
-
duration: number;
|
|
69
|
-
ok: boolean;
|
|
70
|
-
results: TestResultSummary[];
|
|
71
|
-
};
|
|
72
|
-
export type TestResultSummary = {
|
|
73
|
-
attachments: {
|
|
74
|
-
name: string;
|
|
75
|
-
contentType: string;
|
|
76
|
-
path?: string;
|
|
77
|
-
}[];
|
|
78
|
-
};
|
|
79
|
-
export type TestCase = Omit<TestCaseSummary, 'results'> & {
|
|
80
|
-
results: TestResult[];
|
|
81
|
-
};
|
|
82
|
-
export type TestAttachment = {
|
|
83
|
-
name: string;
|
|
84
|
-
body?: string;
|
|
85
|
-
path?: string;
|
|
86
|
-
contentType: string;
|
|
87
|
-
};
|
|
88
|
-
export type TestResult = {
|
|
89
|
-
retry: number;
|
|
90
|
-
startTime: string;
|
|
91
|
-
duration: number;
|
|
92
|
-
steps: TestStep[];
|
|
93
|
-
errors: string[];
|
|
94
|
-
attachments: TestAttachment[];
|
|
95
|
-
status: 'passed' | 'failed' | 'timedOut' | 'skipped' | 'interrupted';
|
|
96
|
-
};
|
|
97
|
-
export type TestStep = {
|
|
98
|
-
title: string;
|
|
99
|
-
startTime: string;
|
|
100
|
-
duration: number;
|
|
101
|
-
location?: Location;
|
|
102
|
-
snippet?: string;
|
|
103
|
-
error?: string;
|
|
104
|
-
steps: TestStep[];
|
|
105
|
-
count: number;
|
|
106
|
-
};
|
|
107
|
-
//# sourceMappingURL=html-reporter-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"html-reporter-types.d.ts","sourceRoot":"","sources":["../../../src/reporter/third_party/html-reporter-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,MAAM,KAAK,GAAG;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,OAAO,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,C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AAC,WAAW,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACrE,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,GAAG;IACxD,OAAO,EAAE,UAAU,EAAE,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,GAAG,aAAa,CAAC;CACtE,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Original file: https://github.com/microsoft/playwright/blob/cf8c14f884b6f24966350a5f49b1580c3e183d21/packages/html-reporter/src/types.ts
|
|
4
|
-
* Copyright (c) Microsoft Corporation.
|
|
5
|
-
*
|
|
6
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
* you may not use this file except in compliance with the License.
|
|
8
|
-
* You may obtain a copy of the License at
|
|
9
|
-
*
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
-
* See the License for the specific language governing permissions and
|
|
16
|
-
* limitations under the License.
|
|
17
|
-
*/
|
|
18
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
package/eslint.config.mjs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import libraryConfig from "../eslint-config/library.mjs";
|
|
2
|
-
import tsParser from "@typescript-eslint/parser";
|
|
3
|
-
|
|
4
|
-
export default [
|
|
5
|
-
...libraryConfig,
|
|
6
|
-
{
|
|
7
|
-
ignores: ["src/reporter/third_party/**/*"],
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
files: ["src/**/*.ts", "src/**/*.tsx"],
|
|
11
|
-
languageOptions: {
|
|
12
|
-
parser: tsParser,
|
|
13
|
-
globals: {
|
|
14
|
-
node: true,
|
|
15
|
-
browser: true,
|
|
16
|
-
},
|
|
17
|
-
parserOptions: {
|
|
18
|
-
project: "./tsconfig.lint.json",
|
|
19
|
-
tsconfigRootDir: import.meta.dirname,
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
];
|