html-reporter 9.15.0 → 9.16.1
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/hermione.d.ts +4 -2
- package/build/hermione.js +96 -58
- package/build/hermione.js.map +1 -1
- package/build/lib/cache.d.ts +8 -0
- package/build/lib/cache.js +29 -0
- package/build/lib/cache.js.map +1 -0
- package/build/lib/cli-commands/gui.js +1 -1
- package/build/lib/cli-commands/gui.js.map +1 -1
- package/build/lib/cli-commands/merge-reports.js +6 -1
- package/build/lib/cli-commands/merge-reports.js.map +1 -1
- package/build/lib/cli-commands/remove-unused-screens/utils.d.ts +4 -4
- package/build/lib/common-utils.d.ts +19 -10
- package/build/lib/common-utils.js +57 -10
- package/build/lib/common-utils.js.map +1 -1
- package/build/lib/config/custom-gui-asserts.js +24 -4
- package/build/lib/config/custom-gui-asserts.js.map +1 -1
- package/build/lib/constants/database.d.ts +60 -7
- package/build/lib/constants/database.js.map +1 -1
- package/build/lib/constants/errors.d.ts +2 -5
- package/build/lib/constants/errors.js +5 -8
- package/build/lib/constants/errors.js.map +1 -1
- package/build/lib/constants/index.d.ts +1 -0
- package/build/lib/constants/index.js +1 -0
- package/build/lib/constants/index.js.map +1 -1
- package/build/lib/constants/tests.d.ts +3 -0
- package/build/lib/constants/tests.js +4 -1
- package/build/lib/constants/tests.js.map +1 -1
- package/build/lib/db-utils/common.js.map +1 -1
- package/build/lib/db-utils/server.d.ts +3 -3
- package/build/lib/db-utils/server.js +4 -4
- package/build/lib/db-utils/server.js.map +1 -1
- package/build/lib/errors/index.d.ts +6 -6
- package/build/lib/gui/api/facade.d.ts +6 -7
- package/build/lib/gui/api/facade.js +13 -7
- package/build/lib/gui/api/facade.js.map +1 -1
- package/build/lib/gui/api/index.d.ts +16 -8
- package/build/lib/gui/api/index.js +9 -6
- package/build/lib/gui/api/index.js.map +1 -1
- package/build/lib/gui/app.d.ts +27 -62
- package/build/lib/gui/app.js +27 -23
- package/build/lib/gui/app.js.map +1 -1
- package/build/lib/gui/constants/client-events.d.ts +11 -6
- package/build/lib/gui/constants/client-events.js +4 -2
- package/build/lib/gui/constants/client-events.js.map +1 -1
- package/build/lib/gui/constants/custom-gui-control-types.d.ts +2 -2
- package/build/lib/gui/constants/custom-gui-control-types.js +5 -5
- package/build/lib/gui/constants/custom-gui-control-types.js.map +1 -1
- package/build/lib/gui/constants/gui-events.d.ts +7 -2
- package/build/lib/gui/constants/gui-events.js +4 -2
- package/build/lib/gui/constants/gui-events.js.map +1 -1
- package/build/lib/gui/constants/index.d.ts +4 -0
- package/build/lib/gui/constants/index.js +21 -0
- package/build/lib/gui/constants/index.js.map +1 -0
- package/build/lib/gui/constants/server.d.ts +3 -3
- package/build/lib/gui/constants/server.js +6 -6
- package/build/lib/gui/constants/server.js.map +1 -1
- package/build/lib/gui/event-source.d.ts +6 -5
- package/build/lib/gui/event-source.js +11 -5
- package/build/lib/gui/event-source.js.map +1 -1
- package/build/lib/gui/index.d.ts +19 -8
- package/build/lib/gui/index.js +2 -2
- package/build/lib/gui/index.js.map +1 -1
- package/build/lib/gui/routes/plugins.d.ts +3 -2
- package/build/lib/gui/routes/plugins.js +17 -14
- package/build/lib/gui/routes/plugins.js.map +1 -1
- package/build/lib/gui/server.d.ts +3 -8
- package/build/lib/gui/server.js +65 -52
- package/build/lib/gui/server.js.map +1 -1
- package/build/lib/gui/tool-runner/index.d.ts +52 -105
- package/build/lib/gui/tool-runner/index.js +190 -124
- package/build/lib/gui/tool-runner/index.js.map +1 -1
- package/build/lib/gui/tool-runner/report-subscriber.d.ts +4 -2
- package/build/lib/gui/tool-runner/report-subscriber.js +39 -76
- package/build/lib/gui/tool-runner/report-subscriber.js.map +1 -1
- package/build/lib/gui/tool-runner/runner/all-test-runner.d.ts +4 -3
- package/build/lib/gui/tool-runner/runner/all-test-runner.js +7 -4
- package/build/lib/gui/tool-runner/runner/all-test-runner.js.map +1 -1
- package/build/lib/gui/tool-runner/runner/index.d.ts +3 -3
- package/build/lib/gui/tool-runner/runner/index.js +14 -8
- package/build/lib/gui/tool-runner/runner/index.js.map +1 -1
- package/build/lib/gui/tool-runner/runner/runner.d.ts +12 -5
- package/build/lib/gui/tool-runner/runner/runner.js +6 -3
- package/build/lib/gui/tool-runner/runner/runner.js.map +1 -1
- package/build/lib/gui/tool-runner/runner/specific-test-runner.d.ts +7 -6
- package/build/lib/gui/tool-runner/runner/specific-test-runner.js +7 -4
- package/build/lib/gui/tool-runner/runner/specific-test-runner.js.map +1 -1
- package/build/lib/gui/tool-runner/utils.d.ts +6 -7
- package/build/lib/gui/tool-runner/utils.js +48 -38
- package/build/lib/gui/tool-runner/utils.js.map +1 -1
- package/build/lib/history-utils.d.ts +1 -1
- package/build/lib/history-utils.js +6 -6
- package/build/lib/history-utils.js.map +1 -1
- package/build/lib/image-store.d.ts +6 -7
- package/build/lib/image-store.js +5 -4
- package/build/lib/image-store.js.map +1 -1
- package/build/lib/images-info-saver.d.ts +28 -0
- package/build/lib/images-info-saver.js +168 -0
- package/build/lib/images-info-saver.js.map +1 -0
- package/build/lib/local-image-file-saver.d.ts +2 -0
- package/build/lib/{local-images-saver.js → local-image-file-saver.js} +3 -3
- package/build/lib/local-image-file-saver.js.map +1 -0
- package/build/lib/merge-reports/index.d.ts +3 -2
- package/build/lib/merge-reports/index.js +26 -9
- package/build/lib/merge-reports/index.js.map +1 -1
- package/build/lib/plugin-api.d.ts +5 -5
- package/build/lib/plugin-api.js +2 -2
- package/build/lib/plugin-api.js.map +1 -1
- package/build/lib/report-builder/gui.d.ts +39 -86
- package/build/lib/report-builder/gui.js +75 -106
- package/build/lib/report-builder/gui.js.map +1 -1
- package/build/lib/report-builder/static.d.ts +19 -27
- package/build/lib/report-builder/static.js +41 -83
- package/build/lib/report-builder/static.js.map +1 -1
- package/build/lib/reporter-helpers.d.ts +7 -3
- package/build/lib/reporter-helpers.js +83 -28
- package/build/lib/reporter-helpers.js.map +1 -1
- package/build/lib/server-utils.d.ts +16 -13
- package/build/lib/server-utils.js +36 -23
- package/build/lib/server-utils.js.map +1 -1
- package/build/lib/sqlite-client.d.ts +58 -0
- package/build/lib/{sqlite-adapter.js → sqlite-client.js} +32 -62
- package/build/lib/sqlite-client.js.map +1 -0
- package/build/lib/static/gui.html +1 -1
- package/build/lib/static/gui.min.css +2 -1
- package/build/lib/static/gui.min.js +1 -124
- package/build/lib/static/index.html +1 -1
- package/build/lib/static/report.min.css +1 -1
- package/build/lib/static/report.min.js +1 -124
- package/build/lib/test-adapter/hermione.d.ts +7 -14
- package/build/lib/test-adapter/hermione.js +79 -86
- package/build/lib/test-adapter/hermione.js.map +1 -1
- package/build/lib/test-adapter/index.d.ts +8 -10
- package/build/lib/test-adapter/index.js +0 -15
- package/build/lib/test-adapter/index.js.map +1 -1
- package/build/lib/test-adapter/playwright.d.ts +7 -11
- package/build/lib/test-adapter/playwright.js +55 -71
- package/build/lib/test-adapter/playwright.js.map +1 -1
- package/build/lib/test-adapter/reporter.d.ts +31 -0
- package/build/lib/test-adapter/reporter.js +87 -0
- package/build/lib/test-adapter/reporter.js.map +1 -0
- package/build/lib/test-adapter/sqlite.d.ts +37 -0
- package/build/lib/test-adapter/sqlite.js +118 -0
- package/build/lib/test-adapter/sqlite.js.map +1 -0
- package/build/lib/test-adapter/transformers/db.d.ts +11 -0
- package/build/lib/test-adapter/transformers/db.js +40 -0
- package/build/lib/test-adapter/transformers/db.js.map +1 -0
- package/build/lib/test-adapter/transformers/tree.d.ts +11 -0
- package/build/lib/test-adapter/transformers/tree.js +24 -0
- package/build/lib/test-adapter/transformers/tree.js.map +1 -0
- package/build/lib/test-adapter/utils/index.d.ts +5 -0
- package/build/lib/test-adapter/utils/index.js +61 -0
- package/build/lib/test-adapter/utils/index.js.map +1 -0
- package/build/lib/test-attempt-manager.d.ts +13 -0
- package/build/lib/test-attempt-manager.js +39 -0
- package/build/lib/test-attempt-manager.js.map +1 -0
- package/build/lib/tests-tree-builder/base.d.ts +19 -11
- package/build/lib/tests-tree-builder/base.js +10 -9
- package/build/lib/tests-tree-builder/base.js.map +1 -1
- package/build/lib/tests-tree-builder/gui.d.ts +53 -66
- package/build/lib/tests-tree-builder/gui.js +30 -33
- package/build/lib/tests-tree-builder/gui.js.map +1 -1
- package/build/lib/tests-tree-builder/static.d.ts +5 -4
- package/build/lib/tests-tree-builder/static.js +9 -24
- package/build/lib/tests-tree-builder/static.js.map +1 -1
- package/build/lib/types.d.ts +70 -61
- package/build/lib/workers/create-workers.d.ts +1 -0
- package/build/lib/workers/worker.d.ts +2 -2
- package/build/lib/workers/worker.js +2 -2
- package/build/lib/workers/worker.js.map +1 -1
- package/build/package.json +27 -16
- package/build/playwright.d.ts +4 -3
- package/build/playwright.js +30 -23
- package/build/playwright.js.map +1 -1
- package/package.json +27 -16
- package/build/lib/errors/db-not-initialized-error.d.ts +0 -3
- package/build/lib/errors/db-not-initialized-error.js +0 -10
- package/build/lib/errors/db-not-initialized-error.js.map +0 -1
- package/build/lib/image-handler.d.ts +0 -34
- package/build/lib/image-handler.js +0 -273
- package/build/lib/image-handler.js.map +0 -1
- package/build/lib/local-images-saver.d.ts +0 -2
- package/build/lib/local-images-saver.js.map +0 -1
- package/build/lib/plugin-adapter.d.ts +0 -17
- package/build/lib/plugin-adapter.js +0 -86
- package/build/lib/plugin-adapter.js.map +0 -1
- package/build/lib/sqlite-adapter.d.ts +0 -68
- package/build/lib/sqlite-adapter.js.map +0 -1
- package/build/lib/test-adapter/cache/hermione.d.ts +0 -1
- package/build/lib/test-adapter/cache/hermione.js +0 -5
- package/build/lib/test-adapter/cache/hermione.js.map +0 -1
- package/build/lib/test-adapter/cache/playwright.d.ts +0 -1
- package/build/lib/test-adapter/cache/playwright.js +0 -5
- package/build/lib/test-adapter/cache/playwright.js.map +0 -1
package/build/lib/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import type { LooksSameOptions, CoordBounds } from 'looks-same';
|
|
2
3
|
import type { default as Hermione, TestResult as HermioneTestResultOriginal } from 'hermione';
|
|
3
|
-
import { DiffModeId, SaveFormat, TestStatus, ViewMode } from './constants';
|
|
4
|
+
import { DiffModeId, SaveFormat, SUITES_TABLE_COLUMNS, TestStatus, ViewMode } from './constants';
|
|
4
5
|
import type { HtmlReporter } from './plugin-api';
|
|
5
6
|
import { ImageDiffError, NoRefImageError } from './errors';
|
|
6
7
|
declare module 'tmp' {
|
|
@@ -9,10 +10,8 @@ declare module 'tmp' {
|
|
|
9
10
|
export { Suite as HermioneSuite } from 'hermione';
|
|
10
11
|
export interface HermioneTestResult extends HermioneTestResultOriginal {
|
|
11
12
|
timestamp?: number;
|
|
12
|
-
updated?: boolean;
|
|
13
|
-
origAttempt?: number;
|
|
14
13
|
}
|
|
15
|
-
export interface
|
|
14
|
+
export interface ImageFileSaver {
|
|
16
15
|
saveImg: (localFilePath: string, options: {
|
|
17
16
|
destPath: string;
|
|
18
17
|
reportDir: string;
|
|
@@ -33,10 +32,13 @@ export interface ImageSize {
|
|
|
33
32
|
width: number;
|
|
34
33
|
height: number;
|
|
35
34
|
}
|
|
36
|
-
export interface
|
|
35
|
+
export interface ImageFile {
|
|
37
36
|
path: string;
|
|
38
37
|
size: ImageSize;
|
|
39
38
|
}
|
|
39
|
+
export interface ImageBuffer {
|
|
40
|
+
buffer: Buffer;
|
|
41
|
+
}
|
|
40
42
|
export interface ImageBase64 {
|
|
41
43
|
base64: string;
|
|
42
44
|
size: ImageSize;
|
|
@@ -46,79 +48,67 @@ export interface DiffOptions extends LooksSameOptions {
|
|
|
46
48
|
reference: string;
|
|
47
49
|
diffColor: string;
|
|
48
50
|
}
|
|
49
|
-
export interface
|
|
51
|
+
export interface TestError {
|
|
52
|
+
name: string;
|
|
53
|
+
message: string;
|
|
54
|
+
stack?: string;
|
|
55
|
+
stateName?: string;
|
|
56
|
+
details?: ErrorDetails;
|
|
57
|
+
screenshot?: ImageBase64 | ImageFile;
|
|
58
|
+
}
|
|
59
|
+
export interface ImageInfoDiff {
|
|
50
60
|
status: TestStatus.FAIL;
|
|
51
61
|
stateName: string;
|
|
52
|
-
refImg?:
|
|
62
|
+
refImg?: ImageFile;
|
|
53
63
|
diffClusters?: CoordBounds[];
|
|
54
|
-
expectedImg:
|
|
55
|
-
actualImg:
|
|
56
|
-
diffImg
|
|
64
|
+
expectedImg: ImageFile;
|
|
65
|
+
actualImg: ImageFile;
|
|
66
|
+
diffImg?: ImageFile | ImageBuffer;
|
|
67
|
+
diffOptions: DiffOptions;
|
|
57
68
|
}
|
|
58
69
|
interface AssertViewSuccess {
|
|
59
70
|
stateName: string;
|
|
60
|
-
refImg:
|
|
71
|
+
refImg: ImageFile;
|
|
61
72
|
}
|
|
62
73
|
export interface ImageInfoSuccess {
|
|
63
|
-
status: TestStatus.SUCCESS
|
|
74
|
+
status: TestStatus.SUCCESS;
|
|
64
75
|
stateName: string;
|
|
65
|
-
refImg?:
|
|
76
|
+
refImg?: ImageFile;
|
|
66
77
|
diffClusters?: CoordBounds[];
|
|
67
|
-
expectedImg:
|
|
68
|
-
actualImg?:
|
|
78
|
+
expectedImg: ImageFile;
|
|
79
|
+
actualImg?: ImageFile;
|
|
69
80
|
}
|
|
70
81
|
export interface ImageInfoPageSuccess {
|
|
71
82
|
status: TestStatus.SUCCESS;
|
|
72
|
-
actualImg:
|
|
83
|
+
actualImg: ImageFile | ImageBase64;
|
|
73
84
|
}
|
|
74
|
-
export interface
|
|
85
|
+
export interface ImageInfoPageError {
|
|
75
86
|
status: TestStatus.ERROR;
|
|
76
|
-
|
|
77
|
-
message: string;
|
|
78
|
-
stack: string;
|
|
79
|
-
};
|
|
80
|
-
stateName?: string;
|
|
81
|
-
refImg?: ImageData;
|
|
82
|
-
diffClusters?: CoordBounds[];
|
|
83
|
-
actualImg: ImageData;
|
|
87
|
+
actualImg: ImageFile | ImageBase64;
|
|
84
88
|
}
|
|
85
|
-
export
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
stack?: string;
|
|
92
|
-
stateName?: string;
|
|
93
|
-
details?: ErrorDetails;
|
|
94
|
-
screenshot?: ImageBase64 | ImageData;
|
|
95
|
-
}
|
|
96
|
-
export interface LabeledSuitesRow {
|
|
97
|
-
imagesInfo: string;
|
|
98
|
-
timestamp: number;
|
|
99
|
-
}
|
|
100
|
-
export type RawSuitesRow = LabeledSuitesRow[keyof LabeledSuitesRow][];
|
|
101
|
-
export interface ParsedSuitesRow {
|
|
102
|
-
description: string | null;
|
|
103
|
-
error: {
|
|
104
|
-
message: string;
|
|
105
|
-
stack: string;
|
|
106
|
-
};
|
|
107
|
-
history: unknown;
|
|
108
|
-
imagesInfo: ImageInfoFull[];
|
|
109
|
-
metaInfo: {
|
|
110
|
-
browserVersion?: string;
|
|
111
|
-
[key: string]: unknown;
|
|
112
|
-
};
|
|
113
|
-
multipleTabs: boolean;
|
|
114
|
-
name: string;
|
|
115
|
-
screenshot: boolean;
|
|
116
|
-
skipReason: string;
|
|
117
|
-
status: TestStatus;
|
|
118
|
-
suiteUrl: string;
|
|
89
|
+
export interface ImageInfoNoRef {
|
|
90
|
+
status: TestStatus.ERROR;
|
|
91
|
+
error?: TestError;
|
|
92
|
+
stateName: string;
|
|
93
|
+
refImg?: ImageFile;
|
|
94
|
+
actualImg: ImageFile;
|
|
119
95
|
}
|
|
120
|
-
export interface
|
|
121
|
-
|
|
96
|
+
export interface ImageInfoUpdated {
|
|
97
|
+
status: TestStatus.UPDATED;
|
|
98
|
+
stateName: string;
|
|
99
|
+
refImg: ImageFile;
|
|
100
|
+
actualImg: ImageFile;
|
|
101
|
+
expectedImg: ImageFile;
|
|
102
|
+
}
|
|
103
|
+
export type ImageInfoWithState = ImageInfoDiff | ImageInfoSuccess | ImageInfoNoRef | ImageInfoUpdated;
|
|
104
|
+
export type ImageInfoFull = ImageInfoWithState | ImageInfoPageSuccess | ImageInfoPageError;
|
|
105
|
+
export type ImageInfo = Omit<ImageInfoDiff, 'status' | 'stateName'> | Omit<ImageInfoSuccess, 'status' | 'stateName'> | Omit<ImageInfoNoRef, 'status' | 'stateName'> | Omit<ImageInfoPageSuccess, 'status' | 'stateName'>;
|
|
106
|
+
export type AssertViewResult = (AssertViewSuccess | ImageDiffError | NoRefImageError) & {
|
|
107
|
+
isUpdated?: boolean;
|
|
108
|
+
};
|
|
109
|
+
export interface TestSpecByPath {
|
|
110
|
+
testPath: string[];
|
|
111
|
+
browserId: string;
|
|
122
112
|
}
|
|
123
113
|
export interface HtmlReporterApi {
|
|
124
114
|
htmlReporter: HtmlReporter;
|
|
@@ -177,3 +167,22 @@ export interface DbUrlsJsonData {
|
|
|
177
167
|
dbUrls: string[];
|
|
178
168
|
jsonUrls: string[];
|
|
179
169
|
}
|
|
170
|
+
export type RawSuitesRow = [
|
|
171
|
+
suitePath: string,
|
|
172
|
+
suiteName: string,
|
|
173
|
+
name: string,
|
|
174
|
+
suiteUrl: string,
|
|
175
|
+
metaInfo: string,
|
|
176
|
+
history: string,
|
|
177
|
+
description: string,
|
|
178
|
+
error: string,
|
|
179
|
+
skipReason: string,
|
|
180
|
+
imagesInfo: string,
|
|
181
|
+
screenshot: number,
|
|
182
|
+
multipleTabs: number,
|
|
183
|
+
status: string,
|
|
184
|
+
timestamp: number
|
|
185
|
+
];
|
|
186
|
+
export type LabeledSuitesRow = {
|
|
187
|
+
[K in (typeof SUITES_TABLE_COLUMNS)[number]['name']]: string;
|
|
188
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare function saveDiffTo(
|
|
1
|
+
import { DiffOptions } from '../types';
|
|
2
|
+
export declare function saveDiffTo(diffOpts: DiffOptions, diffPath: string): Promise<null>;
|
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.saveDiffTo = void 0;
|
|
7
7
|
const looks_same_1 = __importDefault(require("looks-same"));
|
|
8
|
-
function saveDiffTo(
|
|
9
|
-
const { diffColor: highlightColor, ...otherOpts } =
|
|
8
|
+
function saveDiffTo(diffOpts, diffPath) {
|
|
9
|
+
const { diffColor: highlightColor, ...otherOpts } = diffOpts;
|
|
10
10
|
return looks_same_1.default.createDiff({ diff: diffPath, highlightColor, ...otherOpts });
|
|
11
11
|
}
|
|
12
12
|
exports.saveDiffTo = saveDiffTo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker.js","sourceRoot":"","sources":["../../../lib/workers/worker.ts"],"names":[],"mappings":";;;;;;AAAA,4DAAmC;AAGnC,SAAgB,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"worker.js","sourceRoot":"","sources":["../../../lib/workers/worker.ts"],"names":[],"mappings":";;;;;;AAAA,4DAAmC;AAGnC,SAAgB,UAAU,CAAC,QAAqB,EAAE,QAAgB;IAC9D,MAAM,EAAC,SAAS,EAAE,cAAc,EAAE,GAAG,SAAS,EAAC,GAAG,QAAQ,CAAC;IAE3D,OAAO,oBAAS,CAAC,UAAU,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,SAAS,EAAC,CAAC,CAAC;AAChF,CAAC;AAJD,gCAIC"}
|
package/build/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "html-reporter",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.16.1",
|
|
4
4
|
"description": "Plugin for hermione which is intended to aggregate the results of tests running into html report",
|
|
5
5
|
"files": [
|
|
6
6
|
"build"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@babel/runtime": "^7.22.5",
|
|
65
65
|
"@gemini-testing/sql.js": "^2.0.0",
|
|
66
|
-
"axios": "
|
|
66
|
+
"axios": "1.6.3",
|
|
67
67
|
"better-sqlite3": "^8.5.0",
|
|
68
68
|
"bluebird": "^3.5.3",
|
|
69
69
|
"body-parser": "^1.18.2",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"ora": "^5.4.1",
|
|
87
87
|
"p-queue": "^5.0.0",
|
|
88
88
|
"qs": "^6.9.1",
|
|
89
|
-
"signal-exit": "^
|
|
89
|
+
"signal-exit": "^4.1.0",
|
|
90
90
|
"strip-ansi": "^6.0.1",
|
|
91
91
|
"tmp": "^0.1.0",
|
|
92
92
|
"worker-farm": "^1.7.0"
|
|
@@ -101,10 +101,14 @@
|
|
|
101
101
|
"@playwright/test": "^1.37.1",
|
|
102
102
|
"@swc/core": "^1.3.64",
|
|
103
103
|
"@types/better-sqlite3": "^7.6.4",
|
|
104
|
+
"@types/bluebird": "^3.5.3",
|
|
104
105
|
"@types/chai": "^4.3.5",
|
|
105
106
|
"@types/debug": "^4.1.8",
|
|
106
107
|
"@types/enzyme": "^3.10.13",
|
|
108
|
+
"@types/express": "4.16",
|
|
107
109
|
"@types/fs-extra": "^7.0.0",
|
|
110
|
+
"@types/http-codes": "^1.0.4",
|
|
111
|
+
"@types/json-stringify-safe": "^5.0.2",
|
|
108
112
|
"@types/lodash": "^4.14.195",
|
|
109
113
|
"@types/nested-error-stacks": "^2.1.0",
|
|
110
114
|
"@types/opener": "^1.4.0",
|
|
@@ -115,7 +119,8 @@
|
|
|
115
119
|
"@typescript-eslint/eslint-plugin": "^5.60.0",
|
|
116
120
|
"@typescript-eslint/parser": "^5.60.0",
|
|
117
121
|
"app-module-path": "^2.2.0",
|
|
118
|
-
"babel-loader": "^
|
|
122
|
+
"babel-loader": "^9.1.3",
|
|
123
|
+
"buffer": "^6.0.3",
|
|
119
124
|
"chai": "^4.1.2",
|
|
120
125
|
"chai-as-promised": "^7.1.1",
|
|
121
126
|
"classnames": "^2.2.5",
|
|
@@ -123,15 +128,17 @@
|
|
|
123
128
|
"conventional-changelog-lint": "^1.0.1",
|
|
124
129
|
"copyfiles": "^2.4.1",
|
|
125
130
|
"cross-env": "^5.2.0",
|
|
126
|
-
"
|
|
127
|
-
"css-
|
|
131
|
+
"crypto-browserify": "^3.12.0",
|
|
132
|
+
"css-loader": "^6.8.1",
|
|
133
|
+
"css-minimizer-webpack-plugin": "^5.0.1",
|
|
128
134
|
"enzyme": "^3.11.0",
|
|
129
135
|
"enzyme-adapter-react-16": "^1.15.4",
|
|
130
136
|
"eslint": "^8.43.0",
|
|
131
137
|
"eslint-config-gemini-testing": "^2.8.0",
|
|
132
138
|
"eslint-plugin-react": "^7.32.2",
|
|
133
|
-
"
|
|
134
|
-
"
|
|
139
|
+
"events": "^3.3.0",
|
|
140
|
+
"fork-ts-checker-webpack-plugin": "^9.0.0",
|
|
141
|
+
"hermione": "^8.0.0-beta.3",
|
|
135
142
|
"hermione-global-hook": "^1.0.1",
|
|
136
143
|
"hermione-test-repeater": "^0.0.8",
|
|
137
144
|
"html-react-parser": "^0.4.0",
|
|
@@ -142,18 +149,20 @@
|
|
|
142
149
|
"html-reporter-test-server": "file:test/func/packages/html-reporter-test-server",
|
|
143
150
|
"html-reporter-tester": "file:test/func/packages/html-reporter-tester",
|
|
144
151
|
"html-webpack-include-assets-plugin": "^1.0.2",
|
|
145
|
-
"html-webpack-plugin": "^
|
|
152
|
+
"html-webpack-plugin": "^5.5.3",
|
|
153
|
+
"html-webpack-tags-plugin": "^3.0.2",
|
|
146
154
|
"husky": "^0.11.9",
|
|
147
155
|
"ignore-styles": "^5.0.1",
|
|
148
156
|
"immer": "^7.0.15",
|
|
149
157
|
"jsdom": "^21.1.2",
|
|
150
158
|
"jsdom-global": "^3.0.2",
|
|
151
159
|
"less": "^3.11.1",
|
|
152
|
-
"less-loader": "^
|
|
153
|
-
"mini-css-extract-plugin": "^
|
|
160
|
+
"less-loader": "^11.1.3",
|
|
161
|
+
"mini-css-extract-plugin": "^2.7.6",
|
|
154
162
|
"mocha": "^10.2.0",
|
|
155
163
|
"npm-run-all": "^4.1.5",
|
|
156
164
|
"nyc": "^14.1.1",
|
|
165
|
+
"path-browserify": "^1.0.1",
|
|
157
166
|
"prop-types": "^15.6.0",
|
|
158
167
|
"proxyquire": "^1.7.11",
|
|
159
168
|
"raf": "^3.4.0",
|
|
@@ -178,18 +187,20 @@
|
|
|
178
187
|
"semantic-ui-react": "^1.2.1",
|
|
179
188
|
"sinon": "^4.0.1",
|
|
180
189
|
"standard-version": "^4.0.0",
|
|
181
|
-
"
|
|
190
|
+
"stream-browserify": "^3.0.0",
|
|
191
|
+
"style-loader": "^3.3.3",
|
|
182
192
|
"styled-components": "^3.4.10",
|
|
183
193
|
"stylus": "^0.57.0",
|
|
184
|
-
"stylus-loader": "^
|
|
194
|
+
"stylus-loader": "^7.1.3",
|
|
195
|
+
"terser-webpack-plugin": "^5.3.9",
|
|
185
196
|
"tree-kill": "^1.2.2",
|
|
186
197
|
"ts-node": "^10.9.1",
|
|
187
198
|
"type-fest": "^3.13.1",
|
|
188
199
|
"typescript": "^5.0.4",
|
|
189
|
-
"
|
|
200
|
+
"uglify-js": "^3.17.4",
|
|
190
201
|
"web-vitals": "^1.1.2",
|
|
191
|
-
"webpack": "^
|
|
192
|
-
"webpack-cli": "^
|
|
202
|
+
"webpack": "^5.89.0",
|
|
203
|
+
"webpack-cli": "^5.1.4",
|
|
193
204
|
"webpack-dev-server": "^3.11.3",
|
|
194
205
|
"webpack-merge": "^4.1.1"
|
|
195
206
|
}
|
package/build/playwright.d.ts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import PQueue from 'p-queue';
|
|
2
2
|
import { Workers } from 'worker-farm';
|
|
3
|
+
import type { Reporter, TestCase, TestResult as PwtTestResult } from '@playwright/test/reporter';
|
|
3
4
|
import { StaticReportBuilder } from './lib/report-builder/static';
|
|
4
5
|
import { HtmlReporter } from './lib/plugin-api';
|
|
5
6
|
import { ReporterConfig } from './lib/types';
|
|
6
7
|
import { RegisterWorkers } from './lib/workers/create-workers';
|
|
7
|
-
import PQueue from 'p-queue';
|
|
8
8
|
export { ReporterConfig } from './lib/types';
|
|
9
9
|
declare class MyReporter implements Reporter {
|
|
10
10
|
protected _promiseQueue: PQueue;
|
|
11
|
-
protected _staticReportBuilder: StaticReportBuilder;
|
|
11
|
+
protected _staticReportBuilder: StaticReportBuilder | null;
|
|
12
12
|
protected _htmlReporter: HtmlReporter;
|
|
13
13
|
protected _config: ReporterConfig;
|
|
14
14
|
protected _workerFarm: Workers;
|
|
15
15
|
protected _workers: RegisterWorkers<['saveDiffTo']>;
|
|
16
|
+
protected _initPromise: Promise<void>;
|
|
16
17
|
constructor(opts: Partial<ReporterConfig>);
|
|
17
18
|
onTestEnd(test: TestCase, result: PwtTestResult): void;
|
|
18
19
|
onEnd(): Promise<void>;
|
package/build/playwright.js
CHANGED
|
@@ -4,50 +4,57 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const util_1 = require("util");
|
|
7
|
+
const events_1 = require("events");
|
|
7
8
|
const lodash_1 = __importDefault(require("lodash"));
|
|
9
|
+
const p_queue_1 = __importDefault(require("p-queue"));
|
|
8
10
|
const worker_farm_1 = __importDefault(require("worker-farm"));
|
|
9
11
|
const static_1 = require("./lib/report-builder/static");
|
|
10
12
|
const plugin_api_1 = require("./lib/plugin-api");
|
|
11
13
|
const config_1 = require("./lib/config");
|
|
12
14
|
const constants_1 = require("./lib/constants");
|
|
13
|
-
const events_1 = require("events");
|
|
14
15
|
const playwright_1 = require("./lib/test-adapter/playwright");
|
|
15
|
-
const
|
|
16
|
+
const sqlite_client_1 = require("./lib/sqlite-client");
|
|
17
|
+
const image_store_1 = require("./lib/image-store");
|
|
18
|
+
const images_info_saver_1 = require("./lib/images-info-saver");
|
|
19
|
+
const cache_1 = require("./lib/cache");
|
|
20
|
+
const server_utils_1 = require("./lib/server-utils");
|
|
16
21
|
class MyReporter {
|
|
17
22
|
constructor(opts) {
|
|
18
23
|
this._promiseQueue = new p_queue_1.default();
|
|
19
24
|
this._config = (0, config_1.parseConfig)(lodash_1.default.omit(opts, ['configDir']));
|
|
20
25
|
this._htmlReporter = plugin_api_1.HtmlReporter.create(this._config, { toolName: constants_1.ToolName.Playwright });
|
|
21
|
-
this._staticReportBuilder =
|
|
26
|
+
this._staticReportBuilder = null;
|
|
22
27
|
this._workerFarm = (0, worker_farm_1.default)(require.resolve('./lib/workers/worker'), ['saveDiffTo']);
|
|
23
28
|
const workers = new events_1.EventEmitter();
|
|
24
29
|
workers.saveDiffTo = (imageDiffError, diffPath) => (0, util_1.promisify)(this._workerFarm.saveDiffTo)(imageDiffError, diffPath);
|
|
25
30
|
this._workers = workers;
|
|
26
|
-
this.
|
|
27
|
-
.
|
|
31
|
+
this._initPromise = (async (htmlReporter, config) => {
|
|
32
|
+
const dbClient = await sqlite_client_1.SqliteClient.create({ htmlReporter, reportPath: config.path });
|
|
33
|
+
const imageStore = new image_store_1.SqliteImageStore(dbClient);
|
|
34
|
+
const expectedPathsCache = new cache_1.Cache(server_utils_1.getExpectedCacheKey);
|
|
35
|
+
const imagesInfoSaver = new images_info_saver_1.ImagesInfoSaver({
|
|
36
|
+
imageFileSaver: htmlReporter.imagesSaver,
|
|
37
|
+
expectedPathsCache,
|
|
38
|
+
imageStore,
|
|
39
|
+
reportPath: htmlReporter.config.path
|
|
40
|
+
});
|
|
41
|
+
this._staticReportBuilder = static_1.StaticReportBuilder.create(htmlReporter, config, { dbClient, imagesInfoSaver });
|
|
42
|
+
this._staticReportBuilder.registerWorkers(workers);
|
|
43
|
+
await this._staticReportBuilder.saveStaticFiles();
|
|
44
|
+
})(this._htmlReporter, this._config);
|
|
45
|
+
this._promiseQueue.add(async () => this._initPromise);
|
|
28
46
|
}
|
|
29
47
|
onTestEnd(test, result) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
else {
|
|
37
|
-
this._staticReportBuilder.addError(formattedResult);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
else if (status === constants_1.TestStatus.SUCCESS) {
|
|
41
|
-
this._staticReportBuilder.addSuccess(formattedResult);
|
|
42
|
-
}
|
|
43
|
-
else if (status === constants_1.TestStatus.SKIPPED) {
|
|
44
|
-
this._staticReportBuilder.addSkipped(formattedResult);
|
|
45
|
-
}
|
|
46
|
-
this._promiseQueue.add(() => this._staticReportBuilder.imageHandler.saveTestImages(formattedResult, this._workers));
|
|
48
|
+
this._promiseQueue.add(async () => {
|
|
49
|
+
await this._initPromise;
|
|
50
|
+
const staticReportBuilder = this._staticReportBuilder;
|
|
51
|
+
const formattedResult = new playwright_1.PlaywrightTestAdapter(test, result, constants_1.UNKNOWN_ATTEMPT);
|
|
52
|
+
await staticReportBuilder.addTestResult(formattedResult);
|
|
53
|
+
});
|
|
47
54
|
}
|
|
48
55
|
async onEnd() {
|
|
49
56
|
await this._promiseQueue.onIdle();
|
|
50
|
-
await this._staticReportBuilder
|
|
57
|
+
await this._staticReportBuilder?.finalize();
|
|
51
58
|
await this._htmlReporter.emitAsync(constants_1.PluginEvents.REPORT_SAVED);
|
|
52
59
|
}
|
|
53
60
|
}
|
package/build/playwright.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playwright.js","sourceRoot":"","sources":["../playwright.ts"],"names":[],"mappings":";;;;;AAAA,+BAA+B;
|
|
1
|
+
{"version":3,"file":"playwright.js","sourceRoot":"","sources":["../playwright.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "html-reporter",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.16.1",
|
|
4
4
|
"description": "Plugin for hermione which is intended to aggregate the results of tests running into html report",
|
|
5
5
|
"files": [
|
|
6
6
|
"build"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@babel/runtime": "^7.22.5",
|
|
65
65
|
"@gemini-testing/sql.js": "^2.0.0",
|
|
66
|
-
"axios": "
|
|
66
|
+
"axios": "1.6.3",
|
|
67
67
|
"better-sqlite3": "^8.5.0",
|
|
68
68
|
"bluebird": "^3.5.3",
|
|
69
69
|
"body-parser": "^1.18.2",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"ora": "^5.4.1",
|
|
87
87
|
"p-queue": "^5.0.0",
|
|
88
88
|
"qs": "^6.9.1",
|
|
89
|
-
"signal-exit": "^
|
|
89
|
+
"signal-exit": "^4.1.0",
|
|
90
90
|
"strip-ansi": "^6.0.1",
|
|
91
91
|
"tmp": "^0.1.0",
|
|
92
92
|
"worker-farm": "^1.7.0"
|
|
@@ -101,10 +101,14 @@
|
|
|
101
101
|
"@playwright/test": "^1.37.1",
|
|
102
102
|
"@swc/core": "^1.3.64",
|
|
103
103
|
"@types/better-sqlite3": "^7.6.4",
|
|
104
|
+
"@types/bluebird": "^3.5.3",
|
|
104
105
|
"@types/chai": "^4.3.5",
|
|
105
106
|
"@types/debug": "^4.1.8",
|
|
106
107
|
"@types/enzyme": "^3.10.13",
|
|
108
|
+
"@types/express": "4.16",
|
|
107
109
|
"@types/fs-extra": "^7.0.0",
|
|
110
|
+
"@types/http-codes": "^1.0.4",
|
|
111
|
+
"@types/json-stringify-safe": "^5.0.2",
|
|
108
112
|
"@types/lodash": "^4.14.195",
|
|
109
113
|
"@types/nested-error-stacks": "^2.1.0",
|
|
110
114
|
"@types/opener": "^1.4.0",
|
|
@@ -115,7 +119,8 @@
|
|
|
115
119
|
"@typescript-eslint/eslint-plugin": "^5.60.0",
|
|
116
120
|
"@typescript-eslint/parser": "^5.60.0",
|
|
117
121
|
"app-module-path": "^2.2.0",
|
|
118
|
-
"babel-loader": "^
|
|
122
|
+
"babel-loader": "^9.1.3",
|
|
123
|
+
"buffer": "^6.0.3",
|
|
119
124
|
"chai": "^4.1.2",
|
|
120
125
|
"chai-as-promised": "^7.1.1",
|
|
121
126
|
"classnames": "^2.2.5",
|
|
@@ -123,15 +128,17 @@
|
|
|
123
128
|
"conventional-changelog-lint": "^1.0.1",
|
|
124
129
|
"copyfiles": "^2.4.1",
|
|
125
130
|
"cross-env": "^5.2.0",
|
|
126
|
-
"
|
|
127
|
-
"css-
|
|
131
|
+
"crypto-browserify": "^3.12.0",
|
|
132
|
+
"css-loader": "^6.8.1",
|
|
133
|
+
"css-minimizer-webpack-plugin": "^5.0.1",
|
|
128
134
|
"enzyme": "^3.11.0",
|
|
129
135
|
"enzyme-adapter-react-16": "^1.15.4",
|
|
130
136
|
"eslint": "^8.43.0",
|
|
131
137
|
"eslint-config-gemini-testing": "^2.8.0",
|
|
132
138
|
"eslint-plugin-react": "^7.32.2",
|
|
133
|
-
"
|
|
134
|
-
"
|
|
139
|
+
"events": "^3.3.0",
|
|
140
|
+
"fork-ts-checker-webpack-plugin": "^9.0.0",
|
|
141
|
+
"hermione": "^8.0.0-beta.3",
|
|
135
142
|
"hermione-global-hook": "^1.0.1",
|
|
136
143
|
"hermione-test-repeater": "^0.0.8",
|
|
137
144
|
"html-react-parser": "^0.4.0",
|
|
@@ -142,18 +149,20 @@
|
|
|
142
149
|
"html-reporter-test-server": "file:test/func/packages/html-reporter-test-server",
|
|
143
150
|
"html-reporter-tester": "file:test/func/packages/html-reporter-tester",
|
|
144
151
|
"html-webpack-include-assets-plugin": "^1.0.2",
|
|
145
|
-
"html-webpack-plugin": "^
|
|
152
|
+
"html-webpack-plugin": "^5.5.3",
|
|
153
|
+
"html-webpack-tags-plugin": "^3.0.2",
|
|
146
154
|
"husky": "^0.11.9",
|
|
147
155
|
"ignore-styles": "^5.0.1",
|
|
148
156
|
"immer": "^7.0.15",
|
|
149
157
|
"jsdom": "^21.1.2",
|
|
150
158
|
"jsdom-global": "^3.0.2",
|
|
151
159
|
"less": "^3.11.1",
|
|
152
|
-
"less-loader": "^
|
|
153
|
-
"mini-css-extract-plugin": "^
|
|
160
|
+
"less-loader": "^11.1.3",
|
|
161
|
+
"mini-css-extract-plugin": "^2.7.6",
|
|
154
162
|
"mocha": "^10.2.0",
|
|
155
163
|
"npm-run-all": "^4.1.5",
|
|
156
164
|
"nyc": "^14.1.1",
|
|
165
|
+
"path-browserify": "^1.0.1",
|
|
157
166
|
"prop-types": "^15.6.0",
|
|
158
167
|
"proxyquire": "^1.7.11",
|
|
159
168
|
"raf": "^3.4.0",
|
|
@@ -178,18 +187,20 @@
|
|
|
178
187
|
"semantic-ui-react": "^1.2.1",
|
|
179
188
|
"sinon": "^4.0.1",
|
|
180
189
|
"standard-version": "^4.0.0",
|
|
181
|
-
"
|
|
190
|
+
"stream-browserify": "^3.0.0",
|
|
191
|
+
"style-loader": "^3.3.3",
|
|
182
192
|
"styled-components": "^3.4.10",
|
|
183
193
|
"stylus": "^0.57.0",
|
|
184
|
-
"stylus-loader": "^
|
|
194
|
+
"stylus-loader": "^7.1.3",
|
|
195
|
+
"terser-webpack-plugin": "^5.3.9",
|
|
185
196
|
"tree-kill": "^1.2.2",
|
|
186
197
|
"ts-node": "^10.9.1",
|
|
187
198
|
"type-fest": "^3.13.1",
|
|
188
199
|
"typescript": "^5.0.4",
|
|
189
|
-
"
|
|
200
|
+
"uglify-js": "^3.17.4",
|
|
190
201
|
"web-vitals": "^1.1.2",
|
|
191
|
-
"webpack": "^
|
|
192
|
-
"webpack-cli": "^
|
|
202
|
+
"webpack": "^5.89.0",
|
|
203
|
+
"webpack-cli": "^5.1.4",
|
|
193
204
|
"webpack-dev-server": "^3.11.3",
|
|
194
205
|
"webpack-merge": "^4.1.1"
|
|
195
206
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DbNotInitializedError = void 0;
|
|
4
|
-
class DbNotInitializedError extends Error {
|
|
5
|
-
constructor() {
|
|
6
|
-
super('Database must be initialized before use');
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
exports.DbNotInitializedError = DbNotInitializedError;
|
|
10
|
-
//# sourceMappingURL=db-not-initialized-error.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"db-not-initialized-error.js","sourceRoot":"","sources":["../../../lib/errors/db-not-initialized-error.ts"],"names":[],"mappings":";;;AAAA,MAAa,qBAAsB,SAAQ,KAAK;IAC5C;QACI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IACrD,CAAC;CACJ;AAJD,sDAIC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import EventEmitter2 from 'eventemitter2';
|
|
2
|
-
import type { ImageStore } from './image-store';
|
|
3
|
-
import { RegisterWorkers } from './workers/create-workers';
|
|
4
|
-
import { AssertViewResult, ImageBase64, ImageData, ImageInfo, ImageInfoFull, ImagesSaver } from './types';
|
|
5
|
-
import { TestStatus } from './constants';
|
|
6
|
-
import { ReporterTestResult } from './test-adapter';
|
|
7
|
-
export type ReporterTestResultPlain = Omit<ReporterTestResult, 'imagesInfo'>;
|
|
8
|
-
export interface ImagesInfoFormatter {
|
|
9
|
-
getImagesInfo(testResult: ReporterTestResultPlain): ImageInfoFull[];
|
|
10
|
-
}
|
|
11
|
-
export interface ImageHandlerOptions {
|
|
12
|
-
reportPath: string;
|
|
13
|
-
}
|
|
14
|
-
export declare class ImageHandler extends EventEmitter2 implements ImagesInfoFormatter {
|
|
15
|
-
private _imageStore;
|
|
16
|
-
private _imagesSaver;
|
|
17
|
-
private _options;
|
|
18
|
-
constructor(imageStore: ImageStore, imagesSaver: ImagesSaver, options: ImageHandlerOptions);
|
|
19
|
-
static getCurrImg(assertViewResults: AssertViewResult[], stateName?: string): ImageData | undefined;
|
|
20
|
-
static getDiffImg(assertViewResults: AssertViewResult[], stateName?: string): ImageData | undefined;
|
|
21
|
-
static getRefImg(assertViewResults: AssertViewResult[], stateName?: string): ImageData | undefined;
|
|
22
|
-
static getScreenshot(testResult: ReporterTestResultPlain): ImageBase64 | ImageData | null | undefined;
|
|
23
|
-
getImagesFor(testResult: ReporterTestResultPlain, assertViewStatus: TestStatus, stateName?: string): ImageInfo | undefined;
|
|
24
|
-
getImagesInfo(testResult: ReporterTestResultPlain): ImageInfoFull[];
|
|
25
|
-
saveTestImages(testResult: ReporterTestResultPlain, worker: RegisterWorkers<['saveDiffTo']>): Promise<unknown[]>;
|
|
26
|
-
setImagesSaver(newImagesSaver: ImagesSaver): void;
|
|
27
|
-
updateCacheExpectedPath(testResult: ReporterTestResultPlain, stateName: string, expectedPath: string): void;
|
|
28
|
-
private _getExpectedKey;
|
|
29
|
-
private _getExpectedPath;
|
|
30
|
-
private _getImgFromStorage;
|
|
31
|
-
private _saveDiffInWorker;
|
|
32
|
-
private _savePageScreenshot;
|
|
33
|
-
private _saveImg;
|
|
34
|
-
}
|