html-reporter 11.2.1 → 11.4.0
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 +2 -2
- package/build/lib/bundle/index.js +220 -194
- package/build/lib/config/index.js +5 -0
- package/build/lib/config/index.js.map +1 -1
- package/build/lib/constants/defaults.js +2 -1
- package/build/lib/constants/defaults.js.map +1 -1
- package/build/lib/constants/diff-modes.d.ts +47 -0
- package/build/lib/constants/diff-modes.js +8 -1
- package/build/lib/constants/diff-modes.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/local-storage.d.ts +2 -0
- package/build/lib/constants/local-storage.js +3 -1
- package/build/lib/constants/local-storage.js.map +1 -1
- package/build/lib/constants/two-up-modes.d.ts +4 -0
- package/build/lib/constants/two-up-modes.js +9 -0
- package/build/lib/constants/two-up-modes.js.map +1 -0
- package/build/lib/report-builder/static.js +7 -0
- package/build/lib/report-builder/static.js.map +1 -1
- package/build/lib/static/134.min.js +1 -1
- package/build/lib/static/23.min.js +1 -1
- package/build/lib/static/231.min.js +1 -0
- package/build/lib/static/359.min.js +1 -0
- package/build/lib/static/490.min.js +1 -0
- package/build/lib/static/613.min.js +1 -1
- package/build/lib/static/641.min.js +1 -1
- package/build/lib/static/698.min.js +1 -0
- package/build/lib/static/949.min.css +1 -0
- package/build/lib/static/949.min.js +1 -0
- package/build/lib/static/gui.html +1 -1
- package/build/lib/static/gui.min.js +1 -1
- package/build/lib/static/index.html +1 -1
- package/build/lib/static/new-ui-gui.html +1 -1
- package/build/lib/static/new-ui-report.html +1 -1
- package/build/lib/static/newGui.min.js +1 -1
- package/build/lib/static/newReport.min.js +1 -1
- package/build/lib/static/report.min.js +1 -1
- package/build/lib/static/search-worker.min.js +1 -1
- package/build/lib/types.d.ts +15 -2
- package/build/lib/types.js +1 -0
- package/build/lib/types.js.map +1 -1
- package/build/package.json +7 -3
- package/package.json +7 -3
- package/plugins-sdk/build-ui/lib/constants/diff-modes.d.ts +47 -0
- package/plugins-sdk/build-ui/lib/constants/index.d.ts +1 -0
- package/plugins-sdk/build-ui/lib/constants/local-storage.d.ts +2 -0
- package/plugins-sdk/build-ui/lib/constants/two-up-modes.d.ts +4 -0
- package/plugins-sdk/build-ui/lib/static/new-ui/types/store.d.ts +4 -1
- package/plugins-sdk/build-ui/lib/types.d.ts +15 -2
- package/build/lib/static/203.min.js +0 -1
- package/build/lib/static/299.min.js +0 -1
- package/build/lib/static/326.min.js +0 -1
- package/build/lib/static/373.min.js +0 -1
- package/build/lib/static/864.min.css +0 -1
- package/build/lib/static/864.min.js +0 -1
- /package/build/lib/static/{299.min.css → 231.min.css} +0 -0
- /package/build/lib/static/{373.min.css → 698.min.css} +0 -0
package/build/lib/types.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { BrowserFeature, DiffModeId, SaveFormat, SUITES_TABLE_COLUMNS, TestStatu
|
|
|
6
6
|
import type { HtmlReporter } from './plugin-api';
|
|
7
7
|
import { ImageDiffError, NoRefImageError } from './errors';
|
|
8
8
|
import { UiMode } from './constants/local-storage';
|
|
9
|
+
import { ReporterTestResult } from './adapters/test-result';
|
|
9
10
|
declare module 'tmp' {
|
|
10
11
|
const tmpdir: string;
|
|
11
12
|
}
|
|
@@ -209,6 +210,12 @@ export interface StaticImageAccepterRequest extends Pick<StaticImageAccepterConf
|
|
|
209
210
|
path: string;
|
|
210
211
|
}>;
|
|
211
212
|
}
|
|
213
|
+
export interface Badge {
|
|
214
|
+
title?: string;
|
|
215
|
+
url?: string;
|
|
216
|
+
icon?: string;
|
|
217
|
+
}
|
|
218
|
+
export type GenerateBadges = (suite: ReporterTestResult) => Array<Badge | null>;
|
|
212
219
|
export interface ReporterConfig {
|
|
213
220
|
baseHost: string;
|
|
214
221
|
commandsWithShortHistory: string[];
|
|
@@ -231,6 +238,7 @@ export interface ReporterConfig {
|
|
|
231
238
|
};
|
|
232
239
|
staticImageAccepter: StaticImageAccepterConfig;
|
|
233
240
|
uiMode: UiMode | null;
|
|
241
|
+
generateBadges: GenerateBadges | null;
|
|
234
242
|
}
|
|
235
243
|
export type ReporterOptions = Omit<ReporterConfig, 'errorPatterns'> & {
|
|
236
244
|
errorPatterns: (string | ErrorPattern)[];
|
|
@@ -290,7 +298,8 @@ export interface TestStepCompressed {
|
|
|
290
298
|
[TestStepKey.Repeat]?: number;
|
|
291
299
|
}
|
|
292
300
|
export declare enum AttachmentType {
|
|
293
|
-
Snapshot = 0
|
|
301
|
+
Snapshot = 0,
|
|
302
|
+
Badges = 1
|
|
294
303
|
}
|
|
295
304
|
export interface SnapshotAttachment {
|
|
296
305
|
type: AttachmentType.Snapshot;
|
|
@@ -298,7 +307,11 @@ export interface SnapshotAttachment {
|
|
|
298
307
|
maxWidth: number;
|
|
299
308
|
maxHeight: number;
|
|
300
309
|
}
|
|
301
|
-
export
|
|
310
|
+
export interface BadgesAttachment {
|
|
311
|
+
type: AttachmentType.Badges;
|
|
312
|
+
list: Badge[];
|
|
313
|
+
}
|
|
314
|
+
export type Attachment = SnapshotAttachment | BadgesAttachment;
|
|
302
315
|
export interface ApiErrorResponse {
|
|
303
316
|
error: {
|
|
304
317
|
message: string;
|
package/build/lib/types.js
CHANGED
|
@@ -15,5 +15,6 @@ var TestStepKey;
|
|
|
15
15
|
var AttachmentType;
|
|
16
16
|
(function (AttachmentType) {
|
|
17
17
|
AttachmentType[AttachmentType["Snapshot"] = 0] = "Snapshot";
|
|
18
|
+
AttachmentType[AttachmentType["Badges"] = 1] = "Badges";
|
|
18
19
|
})(AttachmentType || (exports.AttachmentType = AttachmentType = {}));
|
|
19
20
|
//# sourceMappingURL=types.js.map
|
package/build/lib/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../lib/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../lib/types.ts"],"names":[],"mappings":";;;AA+SA,IAAY,WASX;AATD,WAAY,WAAW;IACnB,yBAAU,CAAA;IACV,yBAAU,CAAA;IACV,6BAAc,CAAA;IACd,6BAAc,CAAA;IACd,6BAAc,CAAA;IACd,4BAAa,CAAA;IACb,+BAAgB,CAAA;IAChB,2BAAY,CAAA;AAChB,CAAC,EATW,WAAW,2BAAX,WAAW,QAStB;AAaD,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,2DAAY,CAAA;IACZ,uDAAU,CAAA;AACd,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB"}
|
package/build/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "html-reporter",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.4.0",
|
|
4
4
|
"description": "Html-reporter and GUI for viewing and managing results of a tests run. Currently supports Testplane and Hermione.",
|
|
5
5
|
"files": [
|
|
6
6
|
"build",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"e2e:generate-fixtures": "npm run --workspace=test/func/fixtures generate",
|
|
43
43
|
"e2e:test": "npm run --workspace=test/func/tests test",
|
|
44
44
|
"e2e": "npm run e2e:build-packages && npm run e2e:generate-fixtures ; npm run e2e:test",
|
|
45
|
+
"component-tests": "npm run --workspace=test/component test",
|
|
45
46
|
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
|
|
46
47
|
"test": "npm run lint && npm run test-unit && npm run test-check-types",
|
|
47
48
|
"test-check-types": "tsc --project test/unit/lib/static/tsconfig.json && tsc --project test/tsconfig.json",
|
|
@@ -61,7 +62,8 @@
|
|
|
61
62
|
"workspaces": [
|
|
62
63
|
"test/func/fixtures/*",
|
|
63
64
|
"test/func/packages/*",
|
|
64
|
-
"test/func/tests"
|
|
65
|
+
"test/func/tests",
|
|
66
|
+
"test/component"
|
|
65
67
|
],
|
|
66
68
|
"repository": {
|
|
67
69
|
"type": "git",
|
|
@@ -160,6 +162,7 @@
|
|
|
160
162
|
"@tanstack/react-virtual": "^3.8.3",
|
|
161
163
|
"@testing-library/react": "^16.0.0",
|
|
162
164
|
"@testing-library/user-event": "^14.5.2",
|
|
165
|
+
"@testplane/testing-library": "^1.0.2",
|
|
163
166
|
"@types/babel__core": "^7.20.5",
|
|
164
167
|
"@types/better-sqlite3": "^7.6.4",
|
|
165
168
|
"@types/bluebird": "^3.5.3",
|
|
@@ -273,10 +276,11 @@
|
|
|
273
276
|
"stylus": "^0.57.0",
|
|
274
277
|
"stylus-loader": "^7.1.3",
|
|
275
278
|
"terser-webpack-plugin": "^5.3.9",
|
|
276
|
-
"testplane": "^8.
|
|
279
|
+
"testplane": "^8.31.7",
|
|
277
280
|
"tree-kill": "^1.2.2",
|
|
278
281
|
"ts-node": "^10.9.1",
|
|
279
282
|
"ts-patch": "^3.3.0",
|
|
283
|
+
"tsconfig-paths": "^4.2.0",
|
|
280
284
|
"type-fest": "^3.13.1",
|
|
281
285
|
"typescript": "^5.0.4",
|
|
282
286
|
"typescript-transform-paths": "^3.5.5",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "html-reporter",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.4.0",
|
|
4
4
|
"description": "Html-reporter and GUI for viewing and managing results of a tests run. Currently supports Testplane and Hermione.",
|
|
5
5
|
"files": [
|
|
6
6
|
"build",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"e2e:generate-fixtures": "npm run --workspace=test/func/fixtures generate",
|
|
43
43
|
"e2e:test": "npm run --workspace=test/func/tests test",
|
|
44
44
|
"e2e": "npm run e2e:build-packages && npm run e2e:generate-fixtures ; npm run e2e:test",
|
|
45
|
+
"component-tests": "npm run --workspace=test/component test",
|
|
45
46
|
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
|
|
46
47
|
"test": "npm run lint && npm run test-unit && npm run test-check-types",
|
|
47
48
|
"test-check-types": "tsc --project test/unit/lib/static/tsconfig.json && tsc --project test/tsconfig.json",
|
|
@@ -61,7 +62,8 @@
|
|
|
61
62
|
"workspaces": [
|
|
62
63
|
"test/func/fixtures/*",
|
|
63
64
|
"test/func/packages/*",
|
|
64
|
-
"test/func/tests"
|
|
65
|
+
"test/func/tests",
|
|
66
|
+
"test/component"
|
|
65
67
|
],
|
|
66
68
|
"repository": {
|
|
67
69
|
"type": "git",
|
|
@@ -160,6 +162,7 @@
|
|
|
160
162
|
"@tanstack/react-virtual": "^3.8.3",
|
|
161
163
|
"@testing-library/react": "^16.0.0",
|
|
162
164
|
"@testing-library/user-event": "^14.5.2",
|
|
165
|
+
"@testplane/testing-library": "^1.0.2",
|
|
163
166
|
"@types/babel__core": "^7.20.5",
|
|
164
167
|
"@types/better-sqlite3": "^7.6.4",
|
|
165
168
|
"@types/bluebird": "^3.5.3",
|
|
@@ -273,10 +276,11 @@
|
|
|
273
276
|
"stylus": "^0.57.0",
|
|
274
277
|
"stylus-loader": "^7.1.3",
|
|
275
278
|
"terser-webpack-plugin": "^5.3.9",
|
|
276
|
-
"testplane": "^8.
|
|
279
|
+
"testplane": "^8.31.7",
|
|
277
280
|
"tree-kill": "^1.2.2",
|
|
278
281
|
"ts-node": "^10.9.1",
|
|
279
282
|
"ts-patch": "^3.3.0",
|
|
283
|
+
"tsconfig-paths": "^4.2.0",
|
|
280
284
|
"type-fest": "^3.13.1",
|
|
281
285
|
"typescript": "^5.0.4",
|
|
282
286
|
"typescript-transform-paths": "^3.5.5",
|
|
@@ -35,7 +35,54 @@ export declare const DiffModes: {
|
|
|
35
35
|
readonly title: "Onion skin";
|
|
36
36
|
readonly description: "Onion Skin. Change the image opacity to compare expected and actual images.";
|
|
37
37
|
};
|
|
38
|
+
readonly TWO_UP_INTERACTIVE: {
|
|
39
|
+
readonly id: "2-up-interactive";
|
|
40
|
+
readonly title: "2-up Interactive";
|
|
41
|
+
readonly description: "2-up Interactive. Compare expected and actual images side by side with synchronized pan and zoom.";
|
|
42
|
+
};
|
|
38
43
|
};
|
|
44
|
+
export declare const ClassicDiffModes: Pick<{
|
|
45
|
+
readonly THREE_UP: {
|
|
46
|
+
readonly id: "3-up";
|
|
47
|
+
readonly title: "List";
|
|
48
|
+
readonly description: "List. Show images one after another in vertical layout.";
|
|
49
|
+
};
|
|
50
|
+
readonly THREE_UP_SCALED: {
|
|
51
|
+
readonly id: "3-up-scaled";
|
|
52
|
+
readonly title: "SbS";
|
|
53
|
+
readonly description: "Side by Side. Show images in one row.";
|
|
54
|
+
};
|
|
55
|
+
readonly THREE_UP_SCALED_TO_FIT: {
|
|
56
|
+
readonly id: "3-up-scaled-to-fit";
|
|
57
|
+
readonly title: "SbS (fit screen)";
|
|
58
|
+
readonly description: "Side by Side. Show images in one row and scale them down if needed to fit the screen.";
|
|
59
|
+
};
|
|
60
|
+
readonly ONLY_DIFF: {
|
|
61
|
+
readonly id: "only-diff";
|
|
62
|
+
readonly title: "Only Diff";
|
|
63
|
+
readonly description: "Only Diff. Show only diff image, click to highlight diff areas.";
|
|
64
|
+
};
|
|
65
|
+
readonly SWITCH: {
|
|
66
|
+
readonly id: "switch";
|
|
67
|
+
readonly title: "Switch";
|
|
68
|
+
readonly description: "Switch. Click to switch between expected and actual images.";
|
|
69
|
+
};
|
|
70
|
+
readonly SWIPE: {
|
|
71
|
+
readonly id: "swipe";
|
|
72
|
+
readonly title: "Swipe";
|
|
73
|
+
readonly description: "Swipe. Move the divider to compare expected and actual images.";
|
|
74
|
+
};
|
|
75
|
+
readonly ONION_SKIN: {
|
|
76
|
+
readonly id: "onion-skin";
|
|
77
|
+
readonly title: "Onion skin";
|
|
78
|
+
readonly description: "Onion Skin. Change the image opacity to compare expected and actual images.";
|
|
79
|
+
};
|
|
80
|
+
readonly TWO_UP_INTERACTIVE: {
|
|
81
|
+
readonly id: "2-up-interactive";
|
|
82
|
+
readonly title: "2-up Interactive";
|
|
83
|
+
readonly description: "2-up Interactive. Compare expected and actual images side by side with synchronized pan and zoom.";
|
|
84
|
+
};
|
|
85
|
+
}, "THREE_UP" | "THREE_UP_SCALED" | "THREE_UP_SCALED_TO_FIT" | "ONLY_DIFF" | "SWITCH" | "SWIPE" | "ONION_SKIN">;
|
|
39
86
|
export type DiffModes = typeof DiffModes;
|
|
40
87
|
export type DiffMode = ValueOf<DiffModes>;
|
|
41
88
|
export type DiffModeId = DiffModes[keyof DiffModes]['id'];
|
|
@@ -3,6 +3,8 @@ export declare enum LocalStorageKey {
|
|
|
3
3
|
TimeTravelUseRecommendedSettings = "time-travel-use-recommended-settings"
|
|
4
4
|
}
|
|
5
5
|
export declare const TIME_TRAVEL_PLAYER_VISIBILITY_KEY = "time-travel-player-visibility";
|
|
6
|
+
export declare const TWO_UP_DIFF_VISIBILITY_KEY = "2up-diff-visibility";
|
|
7
|
+
export declare const TWO_UP_FIT_MODE_KEY = "2up-fit-mode";
|
|
6
8
|
export declare enum UiMode {
|
|
7
9
|
Old = "old",
|
|
8
10
|
New = "new"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CoordBounds } from 'looks-same';
|
|
2
|
-
import { BrowserFeature, DiffModeId, Feature, TestStatus, ViewMode } from "../../../constants";
|
|
2
|
+
import { BrowserFeature, DiffModeId, Feature, TestStatus, ViewMode, TwoUpFitMode } from "../../../constants";
|
|
3
3
|
import { Attachment, BrowserItem, ImageFile, RefImageFile, StoreReporterConfig, TestError, TestStepCompressed } from "../../../types";
|
|
4
4
|
import { HtmlReporterValues } from "../../../plugin-api";
|
|
5
5
|
import { Point } from "./index";
|
|
@@ -233,6 +233,7 @@ export interface State {
|
|
|
233
233
|
useMatchCaseFilter: boolean;
|
|
234
234
|
viewMode: ViewMode;
|
|
235
235
|
filteredBrowsers: BrowserItem[];
|
|
236
|
+
diffMode: DiffModeId;
|
|
236
237
|
};
|
|
237
238
|
loading: {
|
|
238
239
|
/** @note Determines whether the loading bar is visible */
|
|
@@ -277,6 +278,8 @@ export interface State {
|
|
|
277
278
|
[Page.visualChecksPage]: {
|
|
278
279
|
sectionSizes: number[];
|
|
279
280
|
backupSectionSizes: number[];
|
|
281
|
+
is2UpDiffVisible: boolean;
|
|
282
|
+
twoUpFitMode: TwoUpFitMode;
|
|
280
283
|
};
|
|
281
284
|
staticImageAccepterToolbar: {
|
|
282
285
|
offset: Point;
|
|
@@ -6,6 +6,7 @@ import { BrowserFeature, DiffModeId, SaveFormat, SUITES_TABLE_COLUMNS, TestStatu
|
|
|
6
6
|
import type { HtmlReporter } from './plugin-api';
|
|
7
7
|
import { ImageDiffError, NoRefImageError } from './errors';
|
|
8
8
|
import { UiMode } from './constants/local-storage';
|
|
9
|
+
import { ReporterTestResult } from './adapters/test-result';
|
|
9
10
|
declare module 'tmp' {
|
|
10
11
|
const tmpdir: string;
|
|
11
12
|
}
|
|
@@ -209,6 +210,12 @@ export interface StaticImageAccepterRequest extends Pick<StaticImageAccepterConf
|
|
|
209
210
|
path: string;
|
|
210
211
|
}>;
|
|
211
212
|
}
|
|
213
|
+
export interface Badge {
|
|
214
|
+
title?: string;
|
|
215
|
+
url?: string;
|
|
216
|
+
icon?: string;
|
|
217
|
+
}
|
|
218
|
+
export type GenerateBadges = (suite: ReporterTestResult) => Array<Badge | null>;
|
|
212
219
|
export interface ReporterConfig {
|
|
213
220
|
baseHost: string;
|
|
214
221
|
commandsWithShortHistory: string[];
|
|
@@ -231,6 +238,7 @@ export interface ReporterConfig {
|
|
|
231
238
|
};
|
|
232
239
|
staticImageAccepter: StaticImageAccepterConfig;
|
|
233
240
|
uiMode: UiMode | null;
|
|
241
|
+
generateBadges: GenerateBadges | null;
|
|
234
242
|
}
|
|
235
243
|
export type ReporterOptions = Omit<ReporterConfig, 'errorPatterns'> & {
|
|
236
244
|
errorPatterns: (string | ErrorPattern)[];
|
|
@@ -290,7 +298,8 @@ export interface TestStepCompressed {
|
|
|
290
298
|
[TestStepKey.Repeat]?: number;
|
|
291
299
|
}
|
|
292
300
|
export declare enum AttachmentType {
|
|
293
|
-
Snapshot = 0
|
|
301
|
+
Snapshot = 0,
|
|
302
|
+
Badges = 1
|
|
294
303
|
}
|
|
295
304
|
export interface SnapshotAttachment {
|
|
296
305
|
type: AttachmentType.Snapshot;
|
|
@@ -298,7 +307,11 @@ export interface SnapshotAttachment {
|
|
|
298
307
|
maxWidth: number;
|
|
299
308
|
maxHeight: number;
|
|
300
309
|
}
|
|
301
|
-
export
|
|
310
|
+
export interface BadgesAttachment {
|
|
311
|
+
type: AttachmentType.Badges;
|
|
312
|
+
list: Badge[];
|
|
313
|
+
}
|
|
314
|
+
export type Attachment = SnapshotAttachment | BadgesAttachment;
|
|
302
315
|
export interface ApiErrorResponse {
|
|
303
316
|
error: {
|
|
304
317
|
message: string;
|