html-reporter 9.10.3 → 9.11.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.js +11 -7
- package/build/hermione.js.map +1 -1
- package/build/lib/cli-commands/gui.js +2 -1
- package/build/lib/cli-commands/gui.js.map +1 -1
- package/build/lib/cli-commands/index.d.ts +5 -3
- package/build/lib/cli-commands/index.js +4 -2
- package/build/lib/cli-commands/index.js.map +1 -1
- package/build/lib/cli-commands/merge-reports.js +2 -1
- package/build/lib/cli-commands/merge-reports.js.map +1 -1
- package/build/lib/cli-commands/remove-unused-screens/index.js +2 -1
- package/build/lib/cli-commands/remove-unused-screens/index.js.map +1 -1
- package/build/lib/common-utils.d.ts +19 -8
- package/build/lib/common-utils.js +61 -12
- package/build/lib/common-utils.js.map +1 -1
- package/build/lib/config/custom-gui-asserts.d.ts +1 -1
- package/build/lib/config/custom-gui-asserts.js +28 -22
- package/build/lib/config/custom-gui-asserts.js.map +1 -1
- package/build/lib/config/index.d.ts +2 -21
- package/build/lib/config/index.js +84 -80
- package/build/lib/config/index.js.map +1 -1
- package/build/lib/constants/browser.d.ts +2 -2
- package/build/lib/constants/browser.js +6 -3
- package/build/lib/constants/browser.js.map +1 -1
- package/build/lib/constants/database.d.ts +32 -25
- package/build/lib/constants/database.js +29 -30
- package/build/lib/constants/database.js.map +1 -1
- package/build/lib/constants/defaults.d.ts +3 -18
- package/build/lib/constants/defaults.js +25 -21
- package/build/lib/constants/defaults.js.map +1 -1
- package/build/lib/constants/diff-modes.d.ts +41 -53
- package/build/lib/constants/diff-modes.js +3 -1
- package/build/lib/constants/diff-modes.js.map +1 -1
- package/build/lib/constants/index.d.ts +9 -0
- package/build/lib/constants/index.js +26 -0
- package/build/lib/constants/index.js.map +1 -0
- package/build/lib/constants/paths.d.ts +2 -2
- package/build/lib/constants/paths.js +5 -5
- package/build/lib/constants/paths.js.map +1 -1
- package/build/lib/constants/performance-marks.d.ts +9 -0
- package/build/lib/constants/performance-marks.js +11 -0
- package/build/lib/constants/performance-marks.js.map +1 -0
- package/build/lib/constants/plugin-events.d.ts +6 -5
- package/build/lib/constants/plugin-events.js +10 -9
- package/build/lib/constants/plugin-events.js.map +1 -1
- package/build/lib/constants/save-formats.d.ts +3 -1
- package/build/lib/constants/save-formats.js +7 -4
- package/build/lib/constants/save-formats.js.map +1 -1
- package/build/lib/constants/test-statuses.d.ts +18 -8
- package/build/lib/constants/test-statuses.js +22 -11
- package/build/lib/constants/test-statuses.js.map +1 -1
- package/build/lib/constants/view-modes.d.ts +7 -5
- package/build/lib/constants/view-modes.js +11 -8
- package/build/lib/constants/view-modes.js.map +1 -1
- package/build/lib/csv-adapter.d.ts +68 -0
- package/build/lib/csv-adapter.js +154 -0
- package/build/lib/csv-adapter.js.map +1 -0
- package/build/lib/db-utils/client.d.ts +6 -19
- package/build/lib/db-utils/client.js +1 -0
- package/build/lib/db-utils/client.js.map +1 -1
- package/build/lib/db-utils/common.d.ts +28 -10
- package/build/lib/db-utils/common.js +29 -20
- package/build/lib/db-utils/common.js.map +1 -1
- package/build/lib/db-utils/server.d.ts +9 -16
- package/build/lib/db-utils/server.js +82 -43
- package/build/lib/db-utils/server.js.map +1 -1
- package/build/lib/errors/db-not-initialized-error.d.ts +3 -0
- package/build/lib/errors/db-not-initialized-error.js +10 -0
- package/build/lib/errors/db-not-initialized-error.js.map +1 -0
- package/build/lib/errors/index.d.ts +28 -0
- package/build/lib/errors/index.js +8 -0
- package/build/lib/errors/index.js.map +1 -0
- package/build/lib/gui/app.d.ts +32 -30
- package/build/lib/gui/index.js +26 -2
- package/build/lib/gui/index.js.map +1 -1
- package/build/lib/gui/tool-runner/index.d.ts +46 -60
- package/build/lib/gui/tool-runner/index.js +9 -8
- package/build/lib/gui/tool-runner/index.js.map +1 -1
- package/build/lib/gui/tool-runner/report-subscriber.js +21 -17
- package/build/lib/gui/tool-runner/report-subscriber.js.map +1 -1
- package/build/lib/image-cache.d.ts +3 -0
- package/build/lib/image-cache.js +7 -0
- package/build/lib/image-cache.js.map +1 -0
- package/build/lib/image-handler.d.ts +33 -0
- package/build/lib/image-handler.js +248 -0
- package/build/lib/image-handler.js.map +1 -0
- package/build/lib/image-store.d.ts +11 -0
- package/build/lib/image-store.js +24 -0
- package/build/lib/image-store.js.map +1 -0
- package/build/lib/local-images-saver.d.ts +2 -4
- package/build/lib/local-images-saver.js +6 -4
- package/build/lib/local-images-saver.js.map +1 -1
- package/build/lib/plugin-adapter.d.ts +14 -29
- package/build/lib/plugin-adapter.js +44 -15
- package/build/lib/plugin-adapter.js.map +1 -1
- package/build/lib/plugin-api.d.ts +31 -55
- package/build/lib/plugin-api.js +21 -12
- package/build/lib/plugin-api.js.map +1 -1
- package/build/lib/plugin-utils.d.ts +2 -3
- package/build/lib/plugin-utils.js +10 -4
- package/build/lib/plugin-utils.js.map +1 -1
- package/build/lib/report-builder/gui.d.ts +49 -34
- package/build/lib/report-builder/gui.js +6 -10
- package/build/lib/report-builder/gui.js.map +1 -1
- package/build/lib/report-builder/static.d.ts +33 -28
- package/build/lib/report-builder/static.js +69 -63
- package/build/lib/report-builder/static.js.map +1 -1
- package/build/lib/reporter-helpers.d.ts +2 -2
- package/build/lib/reporter-helpers.js +5 -4
- package/build/lib/reporter-helpers.js.map +1 -1
- package/build/lib/server-utils.d.ts +69 -42
- package/build/lib/server-utils.js +118 -113
- package/build/lib/server-utils.js.map +1 -1
- package/build/lib/sqlite-adapter.d.ts +66 -76
- package/build/lib/sqlite-adapter.js +62 -61
- package/build/lib/sqlite-adapter.js.map +1 -1
- package/build/lib/static/gui.min.css +1 -1
- package/build/lib/static/gui.min.js +16 -16
- package/build/lib/static/gui.min.js.gz +0 -0
- package/build/lib/static/modules/utils.js +5 -5
- package/build/lib/static/modules/utils.js.map +1 -1
- package/build/lib/static/report.min.css +1 -1
- package/build/lib/static/report.min.js +16 -16
- package/build/lib/static/report.min.js.gz +0 -0
- package/build/lib/suite-adapter.d.ts +14 -13
- package/build/lib/suite-adapter.js +24 -19
- package/build/lib/suite-adapter.js.map +1 -1
- package/build/lib/test-adapter/cache/hermione.d.ts +1 -0
- package/build/lib/test-adapter/cache/hermione.js +5 -0
- package/build/lib/test-adapter/cache/hermione.js.map +1 -0
- package/build/lib/test-adapter/hermione.d.ts +50 -0
- package/build/lib/test-adapter/hermione.js +183 -0
- package/build/lib/test-adapter/hermione.js.map +1 -0
- package/build/lib/test-adapter/index.d.ts +31 -0
- package/build/lib/test-adapter/index.js +18 -0
- package/build/lib/test-adapter/index.js.map +1 -0
- package/build/lib/test-adapter.d.ts +53 -111
- package/build/lib/test-adapter.js +69 -256
- package/build/lib/test-adapter.js.map +1 -1
- package/build/lib/tests-tree-builder/base.d.ts +81 -64
- package/build/lib/tests-tree-builder/base.js +22 -16
- package/build/lib/tests-tree-builder/base.js.map +1 -1
- package/build/lib/tests-tree-builder/gui.d.ts +35 -13
- package/build/lib/tests-tree-builder/gui.js +1 -1
- package/build/lib/tests-tree-builder/gui.js.map +1 -1
- package/build/lib/tests-tree-builder/static.d.ts +45 -51
- package/build/lib/tests-tree-builder/static.js +33 -30
- package/build/lib/tests-tree-builder/static.js.map +1 -1
- package/build/lib/types.d.ts +174 -0
- package/build/lib/types.js +3 -0
- package/build/lib/types.js.map +1 -0
- package/build/lib/workers/create-workers.d.ts +14 -2
- package/build/lib/workers/create-workers.js +5 -2
- package/build/lib/workers/create-workers.js.map +1 -1
- package/build/lib/workers/worker.d.ts +2 -1
- package/build/lib/workers/worker.js +11 -11
- package/build/lib/workers/worker.js.map +1 -1
- package/build/package.json +15 -5
- package/package.json +15 -5
|
@@ -4,13 +4,14 @@ const tmp = require('tmp');
|
|
|
4
4
|
const Promise = require('bluebird');
|
|
5
5
|
const { getShortMD5 } = require('./common-utils');
|
|
6
6
|
const utils = require('./server-utils');
|
|
7
|
+
const { ImageHandler } = require('./image-handler');
|
|
7
8
|
const mkReferenceId = (testId, stateName) => getShortMD5(`${testId}#${stateName}`);
|
|
8
9
|
exports.updateReferenceImage = async (testResult, reportPath, stateName) => {
|
|
9
|
-
const currImg =
|
|
10
|
+
const currImg = ImageHandler.getCurrImg(testResult.assertViewResults, stateName) ?? {};
|
|
10
11
|
const src = currImg.path
|
|
11
12
|
? path.resolve(reportPath, currImg.path)
|
|
12
13
|
: utils.getCurrentAbsolutePath(testResult, reportPath, stateName);
|
|
13
|
-
const referencePath =
|
|
14
|
+
const referencePath = ImageHandler.getRefImg(testResult.assertViewResults, stateName)?.path;
|
|
14
15
|
if (utils.fileExists(referencePath)) {
|
|
15
16
|
const referenceId = mkReferenceId(testResult.id, stateName);
|
|
16
17
|
const oldReferencePath = path.resolve(tmp.tmpdir, referenceId);
|
|
@@ -24,10 +25,10 @@ exports.updateReferenceImage = async (testResult, reportPath, stateName) => {
|
|
|
24
25
|
exports.revertReferenceImage = (testResult, stateName) => {
|
|
25
26
|
const referenceId = mkReferenceId(testResult.id, stateName);
|
|
26
27
|
const oldReferencePath = path.resolve(tmp.tmpdir, referenceId);
|
|
27
|
-
const referencePath =
|
|
28
|
+
const referencePath = ImageHandler.getRefImg(testResult.assertViewResults, stateName)?.path;
|
|
28
29
|
return utils.copyFileAsync(oldReferencePath, referencePath);
|
|
29
30
|
};
|
|
30
31
|
exports.removeReferenceImage = (testResult, stateName) => {
|
|
31
|
-
return utils.deleteFile(
|
|
32
|
+
return utils.deleteFile(ImageHandler.getRefImg(testResult.assertViewResults, stateName)?.path);
|
|
32
33
|
};
|
|
33
34
|
//# sourceMappingURL=reporter-helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reporter-helpers.js","sourceRoot":"","sources":["../../lib/reporter-helpers.js"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAC7B,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;AAC3B,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CA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
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export function
|
|
24
|
-
export function
|
|
25
|
-
export
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
export function
|
|
30
|
-
export function
|
|
31
|
-
export function
|
|
32
|
-
export function
|
|
33
|
-
export function
|
|
34
|
-
export function
|
|
35
|
-
export function
|
|
36
|
-
export function
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
export function
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
export
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { TestStatus } from './constants';
|
|
3
|
+
import type { HtmlReporter } from './plugin-api';
|
|
4
|
+
import type { ReporterTestResult } from './test-adapter';
|
|
5
|
+
import { HermioneTestResult, ReporterConfig } from './types';
|
|
6
|
+
import type Hermione from 'hermione';
|
|
7
|
+
import { ImagesInfoFormatter } from './image-handler';
|
|
8
|
+
interface GetPathOptions {
|
|
9
|
+
stateName?: string;
|
|
10
|
+
imageDir: string;
|
|
11
|
+
attempt: number;
|
|
12
|
+
browserId: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const getReferencePath: (options: GetPathOptions) => string;
|
|
15
|
+
export declare const getCurrentPath: (options: GetPathOptions) => string;
|
|
16
|
+
export declare const getDiffPath: (options: GetPathOptions) => string;
|
|
17
|
+
export declare const getReferenceAbsolutePath: (testResult: ReporterTestResult, reportDir: string, stateName: string) => string;
|
|
18
|
+
export declare const getCurrentAbsolutePath: (testResult: ReporterTestResult, reportDir: string, stateName: string) => string;
|
|
19
|
+
export declare const getDiffAbsolutePath: (testResult: ReporterTestResult, reportDir: string, stateName: string) => string;
|
|
20
|
+
interface CreatePathOptions extends GetPathOptions {
|
|
21
|
+
kind: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function createPath({ attempt: attemptInput, imageDir: imageDirInput, browserId, kind, stateName }: CreatePathOptions): string;
|
|
24
|
+
export declare function createHash(buffer: Buffer): string;
|
|
25
|
+
export interface CopyFileAsyncOptions {
|
|
26
|
+
reportDir: string;
|
|
27
|
+
overwrite: boolean;
|
|
28
|
+
}
|
|
29
|
+
export declare function copyFileAsync(srcPath: string, destPath: string, { reportDir, overwrite }?: Partial<CopyFileAsyncOptions>): Promise<void>;
|
|
30
|
+
export declare function deleteFile(filePath: string): Promise<void>;
|
|
31
|
+
export declare function makeDirFor(destPath: string): Promise<void>;
|
|
32
|
+
export declare function fileExists(path: string): boolean;
|
|
33
|
+
export declare function logPathToHtmlReport(pluginConfig: ReporterConfig): void;
|
|
34
|
+
export declare function logError(e: Error): void;
|
|
35
|
+
export declare function hasImage(formattedResult: ReporterTestResult): boolean;
|
|
36
|
+
export declare function prepareCommonJSData(data: unknown): string;
|
|
37
|
+
export declare function shouldUpdateAttempt(status: TestStatus): boolean;
|
|
38
|
+
export declare function getDetailsFileName(testId: string, browserId: string, attempt: number): string;
|
|
39
|
+
export declare function saveStaticFilesToReportDir(htmlReporter: HtmlReporter, pluginConfig: ReporterConfig, destPath: string): Promise<void>;
|
|
40
|
+
export declare function copyPlugins({ plugins, pluginsEnabled }: ReporterConfig, destPath: string): Promise<void>;
|
|
41
|
+
export declare function copyPlugin(pluginName: string, pluginsPath: string): Promise<void>;
|
|
42
|
+
export declare function urlPathNameEndsWith(currentUrl: string, searchString: string): boolean;
|
|
43
|
+
export declare function writeDatabaseUrlsFile(destPath: string, srcPaths: string[]): Promise<void>;
|
|
44
|
+
export declare function copyToReportDir(destPath: string, files: string[], sourceDirectory: string): Promise<void[]>;
|
|
45
|
+
export type ConfigForStaticFile = Pick<ReporterConfig, 'defaultView' | 'diffMode' | 'baseHost' | 'errorPatterns' | 'metaInfoBaseUrls' | 'customScripts' | 'yandexMetrika' | 'pluginsEnabled' | 'plugins'>;
|
|
46
|
+
export declare function getConfigForStaticFile(pluginConfig: ReporterConfig): ConfigForStaticFile;
|
|
47
|
+
export interface DataForStaticFile {
|
|
48
|
+
skips: object[];
|
|
49
|
+
config: ConfigForStaticFile;
|
|
50
|
+
apiValues: HtmlReporter['values'];
|
|
51
|
+
date: string;
|
|
52
|
+
}
|
|
53
|
+
export declare function getDataForStaticFile(htmlReporter: HtmlReporter, pluginConfig: ReporterConfig): DataForStaticFile;
|
|
54
|
+
export declare function initializeCustomGui(hermione: Hermione, { customGui }: ReporterConfig): Promise<void>;
|
|
55
|
+
export interface CustomGuiActionPayload {
|
|
56
|
+
sectionName: string;
|
|
57
|
+
groupIndex: number;
|
|
58
|
+
controlIndex: number;
|
|
59
|
+
}
|
|
60
|
+
export declare function runCustomGuiAction(hermione: Hermione, { customGui }: ReporterConfig, payload: CustomGuiActionPayload): Promise<void>;
|
|
61
|
+
export declare function getPluginClientScriptPath(pluginName: string): string | null;
|
|
62
|
+
export declare function getPluginMiddleware(pluginName: string): unknown | null;
|
|
63
|
+
export declare function isUnexpectedPlugin(plugins: ReporterConfig['plugins'], pluginName: string): boolean;
|
|
64
|
+
export declare function forEachPlugin(plugins: ReporterConfig['plugins'], callback: (name: string) => void): void;
|
|
65
|
+
export declare function mapPlugins<T>(plugins: ReporterConfig['plugins'], callback: (name: string) => T): T[];
|
|
66
|
+
export declare const formatTestResult: (rawResult: HermioneTestResult, status: TestStatus, { imageHandler }: {
|
|
67
|
+
imageHandler: ImagesInfoFormatter;
|
|
68
|
+
}) => ReporterTestResult;
|
|
69
|
+
export {};
|
|
@@ -1,75 +1,90 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.formatTestResult = exports.mapPlugins = exports.forEachPlugin = exports.isUnexpectedPlugin = exports.getPluginMiddleware = exports.getPluginClientScriptPath = exports.runCustomGuiAction = exports.initializeCustomGui = exports.getDataForStaticFile = exports.getConfigForStaticFile = exports.copyToReportDir = exports.writeDatabaseUrlsFile = exports.urlPathNameEndsWith = exports.copyPlugin = exports.copyPlugins = exports.saveStaticFilesToReportDir = exports.getDetailsFileName = exports.shouldUpdateAttempt = exports.prepareCommonJSData = exports.hasImage = exports.logError = exports.logPathToHtmlReport = exports.fileExists = exports.makeDirFor = exports.deleteFile = exports.copyFileAsync = exports.createHash = exports.createPath = exports.getDiffAbsolutePath = exports.getCurrentAbsolutePath = exports.getReferenceAbsolutePath = exports.getDiffPath = exports.getCurrentPath = exports.getReferencePath = void 0;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const url_1 = __importDefault(require("url"));
|
|
9
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
10
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
11
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
12
|
+
const common_utils_1 = require("./common-utils");
|
|
13
|
+
const constants_1 = require("./constants");
|
|
14
|
+
const crypto_1 = __importDefault(require("crypto"));
|
|
15
|
+
const image_handler_1 = require("./image-handler");
|
|
16
|
+
const test_adapter_1 = require("./test-adapter");
|
|
10
17
|
const DATA_FILE_NAME = 'data.js';
|
|
11
|
-
const getReferencePath = (
|
|
12
|
-
|
|
13
|
-
const
|
|
18
|
+
const getReferencePath = (options) => createPath({ kind: 'ref', ...options });
|
|
19
|
+
exports.getReferencePath = getReferencePath;
|
|
20
|
+
const getCurrentPath = (options) => createPath({ kind: 'current', ...options });
|
|
21
|
+
exports.getCurrentPath = getCurrentPath;
|
|
22
|
+
const getDiffPath = (options) => createPath({ kind: 'diff', ...options });
|
|
23
|
+
exports.getDiffPath = getDiffPath;
|
|
14
24
|
const getReferenceAbsolutePath = (testResult, reportDir, stateName) => {
|
|
15
|
-
const referenceImagePath = getReferencePath(testResult, stateName);
|
|
16
|
-
return
|
|
25
|
+
const referenceImagePath = (0, exports.getReferencePath)({ attempt: testResult.attempt, imageDir: testResult.imageDir, browserId: testResult.browserId, stateName });
|
|
26
|
+
return path_1.default.resolve(reportDir, referenceImagePath);
|
|
17
27
|
};
|
|
28
|
+
exports.getReferenceAbsolutePath = getReferenceAbsolutePath;
|
|
18
29
|
const getCurrentAbsolutePath = (testResult, reportDir, stateName) => {
|
|
19
|
-
const currentImagePath = getCurrentPath(testResult, stateName);
|
|
20
|
-
return
|
|
30
|
+
const currentImagePath = (0, exports.getCurrentPath)({ attempt: testResult.attempt, imageDir: testResult.imageDir, browserId: testResult.browserId, stateName });
|
|
31
|
+
return path_1.default.resolve(reportDir, currentImagePath);
|
|
21
32
|
};
|
|
33
|
+
exports.getCurrentAbsolutePath = getCurrentAbsolutePath;
|
|
22
34
|
const getDiffAbsolutePath = (testResult, reportDir, stateName) => {
|
|
23
|
-
const diffImagePath = getDiffPath(testResult, stateName);
|
|
24
|
-
return
|
|
35
|
+
const diffImagePath = (0, exports.getDiffPath)({ attempt: testResult.attempt, imageDir: testResult.imageDir, browserId: testResult.browserId, stateName });
|
|
36
|
+
return path_1.default.resolve(reportDir, diffImagePath);
|
|
25
37
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
exports.getDiffAbsolutePath = getDiffAbsolutePath;
|
|
39
|
+
function createPath({ attempt: attemptInput, imageDir: imageDirInput, browserId, kind, stateName }) {
|
|
40
|
+
const attempt = attemptInput || 0;
|
|
41
|
+
const imageDir = lodash_1.default.compact([constants_1.IMAGES_PATH, imageDirInput, stateName]);
|
|
42
|
+
const components = imageDir.concat(`${browserId}~${kind}_${attempt}.png`);
|
|
43
|
+
return path_1.default.join(...components);
|
|
44
|
+
}
|
|
45
|
+
exports.createPath = createPath;
|
|
46
|
+
function createHash(buffer) {
|
|
47
|
+
return crypto_1.default
|
|
48
|
+
.createHash('sha1')
|
|
49
|
+
.update(buffer)
|
|
50
|
+
.digest('base64');
|
|
37
51
|
}
|
|
52
|
+
exports.createHash = createHash;
|
|
38
53
|
function copyFileAsync(srcPath, destPath, { reportDir = '', overwrite = true } = {}) {
|
|
39
|
-
const resolvedDestPath =
|
|
40
|
-
return makeDirFor(resolvedDestPath).then(() =>
|
|
54
|
+
const resolvedDestPath = path_1.default.resolve(reportDir, destPath);
|
|
55
|
+
return makeDirFor(resolvedDestPath).then(() => fs_extra_1.default.copy(srcPath, resolvedDestPath, { overwrite }));
|
|
41
56
|
}
|
|
42
|
-
|
|
43
|
-
* @param {String} filePath
|
|
44
|
-
* @returns {Promise}
|
|
45
|
-
*/
|
|
57
|
+
exports.copyFileAsync = copyFileAsync;
|
|
46
58
|
function deleteFile(filePath) {
|
|
47
|
-
return
|
|
59
|
+
return fs_extra_1.default.remove(filePath);
|
|
48
60
|
}
|
|
49
|
-
|
|
50
|
-
* @param {String} destPath
|
|
51
|
-
*/
|
|
61
|
+
exports.deleteFile = deleteFile;
|
|
52
62
|
function makeDirFor(destPath) {
|
|
53
|
-
return
|
|
63
|
+
return fs_extra_1.default.mkdirs(path_1.default.dirname(destPath));
|
|
54
64
|
}
|
|
65
|
+
exports.makeDirFor = makeDirFor;
|
|
55
66
|
function fileExists(path) {
|
|
56
|
-
return
|
|
67
|
+
return fs_extra_1.default.existsSync(path);
|
|
57
68
|
}
|
|
69
|
+
exports.fileExists = fileExists;
|
|
58
70
|
function logPathToHtmlReport(pluginConfig) {
|
|
59
|
-
const reportPath = `file://${
|
|
60
|
-
logger.log(`Your HTML report is here: ${
|
|
61
|
-
logger.log(`To open it use: ${
|
|
71
|
+
const reportPath = `file://${path_1.default.resolve(pluginConfig.path, 'index.html')}`;
|
|
72
|
+
common_utils_1.logger.log(`Your HTML report is here: ${chalk_1.default.yellow(reportPath)}`);
|
|
73
|
+
common_utils_1.logger.log(`To open it use: ${chalk_1.default.yellow('npx hermione gui')} or ${chalk_1.default.yellow(`npx http-server ${pluginConfig.path}`)}`);
|
|
62
74
|
}
|
|
75
|
+
exports.logPathToHtmlReport = logPathToHtmlReport;
|
|
63
76
|
function logError(e) {
|
|
64
|
-
logger.error(`Html-reporter runtime error: ${e.stack}`);
|
|
77
|
+
common_utils_1.logger.error(`Html-reporter runtime error: ${e.stack}`);
|
|
65
78
|
}
|
|
79
|
+
exports.logError = logError;
|
|
66
80
|
function hasImage(formattedResult) {
|
|
67
|
-
return !!formattedResult.
|
|
68
|
-
!!
|
|
81
|
+
return !!formattedResult.imagesInfo?.length ||
|
|
82
|
+
!!image_handler_1.ImageHandler.getCurrImg(formattedResult.assertViewResults)?.path ||
|
|
69
83
|
!!formattedResult.screenshot;
|
|
70
84
|
}
|
|
85
|
+
exports.hasImage = hasImage;
|
|
71
86
|
function prepareCommonJSData(data) {
|
|
72
|
-
const stringifiedData = JSON.stringify(data, (
|
|
87
|
+
const stringifiedData = JSON.stringify(data, (_key, val) => {
|
|
73
88
|
return typeof val === 'function' ? val.toString() : val;
|
|
74
89
|
});
|
|
75
90
|
return [
|
|
@@ -77,55 +92,61 @@ function prepareCommonJSData(data) {
|
|
|
77
92
|
'try { module.exports = data; } catch(e) {}'
|
|
78
93
|
].join('\n');
|
|
79
94
|
}
|
|
95
|
+
exports.prepareCommonJSData = prepareCommonJSData;
|
|
80
96
|
function shouldUpdateAttempt(status) {
|
|
81
|
-
return ![SKIPPED, UPDATED, RUNNING, IDLE].includes(status);
|
|
97
|
+
return ![constants_1.SKIPPED, constants_1.UPDATED, constants_1.RUNNING, constants_1.IDLE].includes(status);
|
|
82
98
|
}
|
|
99
|
+
exports.shouldUpdateAttempt = shouldUpdateAttempt;
|
|
83
100
|
function getDetailsFileName(testId, browserId, attempt) {
|
|
84
101
|
return `${testId}-${browserId}_${Number(attempt) + 1}_${Date.now()}.json`;
|
|
85
102
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
103
|
+
exports.getDetailsFileName = getDetailsFileName;
|
|
104
|
+
async function saveStaticFilesToReportDir(htmlReporter, pluginConfig, destPath) {
|
|
105
|
+
const staticFolder = path_1.default.resolve(__dirname, './static');
|
|
106
|
+
await fs_extra_1.default.ensureDir(destPath);
|
|
89
107
|
await Promise.all([
|
|
90
|
-
|
|
108
|
+
fs_extra_1.default.writeFile(path_1.default.resolve(destPath, DATA_FILE_NAME), prepareCommonJSData(getDataForStaticFile(htmlReporter, pluginConfig)), 'utf8'),
|
|
91
109
|
copyToReportDir(destPath, ['report.min.js', 'report.min.css'], staticFolder),
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
fs.copy(require.resolve('@gemini-testing/sql.js'), path.resolve(destPath, 'sql-wasm.js')),
|
|
110
|
+
fs_extra_1.default.copy(path_1.default.resolve(staticFolder, 'index.html'), path_1.default.resolve(destPath, 'index.html')),
|
|
111
|
+
fs_extra_1.default.copy(path_1.default.resolve(staticFolder, 'icons'), path_1.default.resolve(destPath, 'icons')),
|
|
112
|
+
fs_extra_1.default.copy(require.resolve('@gemini-testing/sql.js'), path_1.default.resolve(destPath, 'sql-wasm.js')),
|
|
96
113
|
copyPlugins(pluginConfig, destPath)
|
|
97
114
|
]);
|
|
98
115
|
}
|
|
116
|
+
exports.saveStaticFilesToReportDir = saveStaticFilesToReportDir;
|
|
99
117
|
async function copyPlugins({ plugins, pluginsEnabled }, destPath) {
|
|
100
|
-
if (!pluginsEnabled || !plugins
|
|
118
|
+
if (!pluginsEnabled || !plugins?.length) {
|
|
101
119
|
return;
|
|
102
120
|
}
|
|
103
121
|
try {
|
|
104
|
-
const pluginsPath =
|
|
105
|
-
await
|
|
122
|
+
const pluginsPath = path_1.default.resolve(destPath, 'plugins');
|
|
123
|
+
await fs_extra_1.default.ensureDir(pluginsPath);
|
|
106
124
|
await Promise.all(mapPlugins(plugins, pluginName => copyPlugin(pluginName, pluginsPath)));
|
|
107
125
|
}
|
|
108
|
-
catch (e) {
|
|
126
|
+
catch (e) { // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
109
127
|
logError(e);
|
|
110
128
|
}
|
|
111
129
|
}
|
|
130
|
+
exports.copyPlugins = copyPlugins;
|
|
112
131
|
async function copyPlugin(pluginName, pluginsPath) {
|
|
113
132
|
const pluginPath = getPluginClientScriptPath(pluginName);
|
|
114
133
|
if (!pluginPath) {
|
|
115
134
|
return;
|
|
116
135
|
}
|
|
117
|
-
const destPluginPath =
|
|
118
|
-
await
|
|
119
|
-
await
|
|
136
|
+
const destPluginPath = path_1.default.resolve(pluginsPath, pluginName, 'plugin.js');
|
|
137
|
+
await fs_extra_1.default.ensureDir(path_1.default.dirname(destPluginPath));
|
|
138
|
+
await fs_extra_1.default.copy(pluginPath, destPluginPath);
|
|
120
139
|
}
|
|
140
|
+
exports.copyPlugin = copyPlugin;
|
|
121
141
|
function urlPathNameEndsWith(currentUrl, searchString) {
|
|
122
142
|
try {
|
|
123
|
-
return
|
|
143
|
+
return url_1.default.parse(currentUrl).pathname?.endsWith(searchString) || false;
|
|
124
144
|
}
|
|
125
145
|
catch (e) {
|
|
126
146
|
return false;
|
|
127
147
|
}
|
|
128
148
|
}
|
|
149
|
+
exports.urlPathNameEndsWith = urlPathNameEndsWith;
|
|
129
150
|
async function writeDatabaseUrlsFile(destPath, srcPaths) {
|
|
130
151
|
const jsonUrls = srcPaths.filter(p => urlPathNameEndsWith(p, '.json'));
|
|
131
152
|
const dbUrls = srcPaths.filter(p => urlPathNameEndsWith(p, '.db'));
|
|
@@ -133,25 +154,19 @@ async function writeDatabaseUrlsFile(destPath, srcPaths) {
|
|
|
133
154
|
dbUrls,
|
|
134
155
|
jsonUrls
|
|
135
156
|
};
|
|
136
|
-
await
|
|
157
|
+
await fs_extra_1.default.writeJson(path_1.default.resolve(destPath, 'databaseUrls.json'), data);
|
|
137
158
|
}
|
|
159
|
+
exports.writeDatabaseUrlsFile = writeDatabaseUrlsFile;
|
|
138
160
|
function copyToReportDir(destPath, files, sourceDirectory) {
|
|
139
161
|
return Promise.all(files.map(fileName => {
|
|
140
|
-
const from =
|
|
141
|
-
const to =
|
|
142
|
-
return
|
|
162
|
+
const from = path_1.default.resolve(sourceDirectory, fileName);
|
|
163
|
+
const to = path_1.default.resolve(destPath, fileName);
|
|
164
|
+
return fs_extra_1.default.copy(from, to);
|
|
143
165
|
}));
|
|
144
166
|
}
|
|
145
|
-
|
|
146
|
-
return {
|
|
147
|
-
skips: [],
|
|
148
|
-
config: getConfigForStaticFile(pluginConfig),
|
|
149
|
-
apiValues: hermione.htmlReporter.values,
|
|
150
|
-
date: new Date().toString()
|
|
151
|
-
};
|
|
152
|
-
}
|
|
167
|
+
exports.copyToReportDir = copyToReportDir;
|
|
153
168
|
function getConfigForStaticFile(pluginConfig) {
|
|
154
|
-
return
|
|
169
|
+
return lodash_1.default.pick(pluginConfig, [
|
|
155
170
|
'defaultView',
|
|
156
171
|
'diffMode',
|
|
157
172
|
'baseHost',
|
|
@@ -163,39 +178,52 @@ function getConfigForStaticFile(pluginConfig) {
|
|
|
163
178
|
'plugins'
|
|
164
179
|
]);
|
|
165
180
|
}
|
|
181
|
+
exports.getConfigForStaticFile = getConfigForStaticFile;
|
|
182
|
+
function getDataForStaticFile(htmlReporter, pluginConfig) {
|
|
183
|
+
return {
|
|
184
|
+
skips: [],
|
|
185
|
+
config: getConfigForStaticFile(pluginConfig),
|
|
186
|
+
apiValues: htmlReporter.values,
|
|
187
|
+
date: new Date().toString()
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
exports.getDataForStaticFile = getDataForStaticFile;
|
|
166
191
|
async function initializeCustomGui(hermione, { customGui }) {
|
|
167
|
-
await Promise.all(
|
|
168
|
-
.flatMap()
|
|
169
|
-
.
|
|
170
|
-
.map((ctx) => ctx.initialize({ hermione, ctx }))
|
|
192
|
+
await Promise.all((0, lodash_1.default)(customGui)
|
|
193
|
+
.flatMap(lodash_1.default.identity)
|
|
194
|
+
.map((ctx) => ctx.initialize?.({ hermione, ctx }))
|
|
171
195
|
.value());
|
|
172
196
|
}
|
|
197
|
+
exports.initializeCustomGui = initializeCustomGui;
|
|
173
198
|
async function runCustomGuiAction(hermione, { customGui }, payload) {
|
|
174
199
|
const { sectionName, groupIndex, controlIndex } = payload;
|
|
175
200
|
const ctx = customGui[sectionName][groupIndex];
|
|
176
201
|
const control = ctx.controls[controlIndex];
|
|
177
202
|
await ctx.action({ hermione, control, ctx });
|
|
178
203
|
}
|
|
204
|
+
exports.runCustomGuiAction = runCustomGuiAction;
|
|
179
205
|
function getPluginClientScriptPath(pluginName) {
|
|
180
206
|
try {
|
|
181
207
|
return require.resolve(`${pluginName}/plugin.js`);
|
|
182
208
|
}
|
|
183
|
-
catch (e) {
|
|
209
|
+
catch (e) { // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
184
210
|
logError(e);
|
|
185
211
|
return null;
|
|
186
212
|
}
|
|
187
213
|
}
|
|
214
|
+
exports.getPluginClientScriptPath = getPluginClientScriptPath;
|
|
188
215
|
function getPluginMiddleware(pluginName) {
|
|
189
216
|
try {
|
|
190
217
|
return require(`${pluginName}/middleware.js`);
|
|
191
218
|
}
|
|
192
|
-
catch (e) {
|
|
219
|
+
catch (e) { // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
193
220
|
if (e.code !== 'MODULE_NOT_FOUND') {
|
|
194
221
|
logError(e);
|
|
195
222
|
}
|
|
196
223
|
return null;
|
|
197
224
|
}
|
|
198
225
|
}
|
|
226
|
+
exports.getPluginMiddleware = getPluginMiddleware;
|
|
199
227
|
function isUnexpectedPlugin(plugins, pluginName) {
|
|
200
228
|
for (const { name } of plugins) {
|
|
201
229
|
if (name === pluginName) {
|
|
@@ -204,6 +232,7 @@ function isUnexpectedPlugin(plugins, pluginName) {
|
|
|
204
232
|
}
|
|
205
233
|
return true;
|
|
206
234
|
}
|
|
235
|
+
exports.isUnexpectedPlugin = isUnexpectedPlugin;
|
|
207
236
|
function forEachPlugin(plugins, callback) {
|
|
208
237
|
const seen = new Set();
|
|
209
238
|
for (const plugin of plugins) {
|
|
@@ -213,39 +242,15 @@ function forEachPlugin(plugins, callback) {
|
|
|
213
242
|
}
|
|
214
243
|
}
|
|
215
244
|
}
|
|
245
|
+
exports.forEachPlugin = forEachPlugin;
|
|
216
246
|
function mapPlugins(plugins, callback) {
|
|
217
247
|
const result = [];
|
|
218
248
|
forEachPlugin(plugins, pluginName => result.push(callback(pluginName)));
|
|
219
249
|
return result;
|
|
220
250
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
getCurrentPath,
|
|
225
|
-
getDiffPath,
|
|
226
|
-
hasImage,
|
|
227
|
-
getReferenceAbsolutePath,
|
|
228
|
-
getCurrentAbsolutePath,
|
|
229
|
-
getDiffAbsolutePath,
|
|
230
|
-
copyFileAsync,
|
|
231
|
-
deleteFile,
|
|
232
|
-
makeDirFor,
|
|
233
|
-
fileExists,
|
|
234
|
-
logPathToHtmlReport,
|
|
235
|
-
logError,
|
|
236
|
-
require,
|
|
237
|
-
prepareCommonJSData,
|
|
238
|
-
shouldUpdateAttempt,
|
|
239
|
-
saveStaticFilesToReportDir,
|
|
240
|
-
copyToReportDir,
|
|
241
|
-
writeDatabaseUrlsFile,
|
|
242
|
-
getConfigForStaticFile,
|
|
243
|
-
getPluginClientScriptPath,
|
|
244
|
-
getPluginMiddleware,
|
|
245
|
-
isUnexpectedPlugin,
|
|
246
|
-
forEachPlugin,
|
|
247
|
-
mapPlugins,
|
|
248
|
-
initializeCustomGui,
|
|
249
|
-
runCustomGuiAction
|
|
251
|
+
exports.mapPlugins = mapPlugins;
|
|
252
|
+
const formatTestResult = (rawResult, status, { imageHandler }) => {
|
|
253
|
+
return new test_adapter_1.HermioneTestAdapter(rawResult, { status, imagesInfoFormatter: imageHandler });
|
|
250
254
|
};
|
|
255
|
+
exports.formatTestResult = formatTestResult;
|
|
251
256
|
//# sourceMappingURL=server-utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-utils.js","sourceRoot":"","sources":["../../lib/server-utils.
|
|
1
|
+
{"version":3,"file":"server-utils.js","sourceRoot":"","sources":["../../lib/server-utils.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,8CAAsB;AACtB,kDAA0B;AAC1B,oDAAuB;AACvB,wDAA0B;AAC1B,iDAAsC;AACtC,2CAAqF;AAKrF,oDAA4B;AAC5B,mDAAkE;AAClE,iDAAmD;AAEnD,MAAM,cAAc,GAAG,SAAS,CAAC;AAS1B,MAAM,gBAAgB,GAAG,CAAC,OAAuB,EAAU,EAAE,CAAC,UAAU,CAAC,EAAC,IAAI,EAAE,KAAK,EAAE,GAAG,OAAO,EAAC,CAAC,CAAC;AAA9F,QAAA,gBAAgB,oBAA8E;AACpG,MAAM,cAAc,GAAG,CAAC,OAAuB,EAAU,EAAE,CAAC,UAAU,CAAC,EAAC,IAAI,EAAE,SAAS,EAAE,GAAG,OAAO,EAAC,CAAC,CAAC;AAAhG,QAAA,cAAc,kBAAkF;AACtG,MAAM,WAAW,GAAG,CAAC,OAAuB,EAAU,EAAE,CAAC,UAAU,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,EAAC,CAAC,CAAC;AAA1F,QAAA,WAAW,eAA+E;AAEhG,MAAM,wBAAwB,GAAG,CAAC,UAA8B,EAAE,SAAiB,EAAE,SAAiB,EAAU,EAAE;IACrH,MAAM,kBAAkB,GAAG,IAAA,wBAAgB,EAAC,EAAC,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAC,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,SAAS,EAAC,CAAC,CAAC;IAEtJ,OAAO,c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