@allurereport/plugin-api 3.16.0 → 3.17.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/dist/config.d.ts +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/plugin.d.ts +1 -1
- package/dist/qualityGate.d.ts +17 -11
- package/dist/report.d.ts +139 -0
- package/dist/report.js +1 -0
- package/dist/staticAssets.d.ts +9 -0
- package/dist/staticAssets.js +105 -0
- package/dist/store.d.ts +12 -5
- package/dist/store.js +3 -1
- package/dist/utils/summary.js +1 -0
- package/package.json +9 -4
package/dist/config.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AllureServiceConfig, CategoriesConfig, DefaultLabelsConfig, EnvironmentsConfig,
|
|
1
|
+
import type { AllureServiceConfig, CategoriesConfig, DefaultLabelsConfig, EnvironmentsConfig, PerformanceConfig, ReportVariables, ResolutionsConfig } from "@allurereport/core-api";
|
|
2
2
|
import type { PluginDescriptor } from "./plugin.js";
|
|
3
3
|
import type { QualityGateConfig } from "./qualityGate.js";
|
|
4
4
|
export interface Config {
|
|
@@ -9,8 +9,7 @@ export interface Config {
|
|
|
9
9
|
hideLabels?: (string | RegExp)[];
|
|
10
10
|
historyPath?: string;
|
|
11
11
|
historyLimit?: number;
|
|
12
|
-
|
|
13
|
-
knownIssues?: KnownIssuesConfig;
|
|
12
|
+
resolutions?: ResolutionsConfig;
|
|
14
13
|
defaultLabels?: DefaultLabelsConfig;
|
|
15
14
|
dump?: string;
|
|
16
15
|
environment?: string;
|
|
@@ -20,6 +19,7 @@ export interface Config {
|
|
|
20
19
|
plugins?: Record<string, PluginDescriptor>;
|
|
21
20
|
appendHistory?: boolean;
|
|
22
21
|
qualityGate?: QualityGateConfig;
|
|
22
|
+
performance?: PerformanceConfig;
|
|
23
23
|
allureService?: AllureServiceConfig;
|
|
24
24
|
categories?: CategoriesConfig;
|
|
25
25
|
globalAttachments?: string[];
|
package/dist/index.d.ts
CHANGED
package/dist/plugin.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export interface PluginContext {
|
|
|
34
34
|
categories?: CategoryDefinition[];
|
|
35
35
|
history?: AllureHistory;
|
|
36
36
|
}
|
|
37
|
-
export type TestResultSummary = Pick<TestResult, "id" | "name" | "duration" | "status">;
|
|
37
|
+
export type TestResultSummary = Pick<TestResult, "id" | "name" | "duration" | "environment" | "status">;
|
|
38
38
|
export interface TestResultRegistry {
|
|
39
39
|
byId: Record<string, TestResultSummary>;
|
|
40
40
|
}
|
package/dist/qualityGate.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { MetricSample, TestResult } from "@allurereport/core-api";
|
|
2
2
|
export type QualityGateValidationResult = {
|
|
3
3
|
success: boolean;
|
|
4
4
|
expected: any;
|
|
@@ -13,28 +13,34 @@ export type QualityGateRules = Record<string, any> & {
|
|
|
13
13
|
fastFail?: boolean;
|
|
14
14
|
filter?: (tr: TestResult) => boolean;
|
|
15
15
|
};
|
|
16
|
-
export type QualityGateRuleResult = {
|
|
16
|
+
export type QualityGateRuleResult<T = unknown> = {
|
|
17
17
|
success: boolean;
|
|
18
|
-
actual:
|
|
18
|
+
actual: T;
|
|
19
19
|
testResults: string[];
|
|
20
20
|
};
|
|
21
|
-
export interface QualityGateRuleState
|
|
22
|
-
getResult():
|
|
23
|
-
setResult(value:
|
|
21
|
+
export interface QualityGateRuleState {
|
|
22
|
+
getResult(): unknown;
|
|
23
|
+
setResult(value: unknown, testResults: string[]): void;
|
|
24
24
|
}
|
|
25
|
-
export type
|
|
25
|
+
export type QualityGateMetricHistoryPoint = {
|
|
26
|
+
uuid?: string;
|
|
27
|
+
timestamp?: number;
|
|
28
|
+
metrics?: Record<string, number>;
|
|
29
|
+
};
|
|
30
|
+
export type QualityGateRule<T = unknown, K = T> = {
|
|
26
31
|
rule: string;
|
|
27
32
|
message: (payload: {
|
|
28
33
|
expected: T;
|
|
29
|
-
actual:
|
|
34
|
+
actual: K;
|
|
30
35
|
}) => string;
|
|
31
36
|
validate: (payload: {
|
|
32
37
|
expected: T;
|
|
33
38
|
trs: TestResult[];
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
state: QualityGateRuleState;
|
|
40
|
+
metrics?: MetricSample[];
|
|
41
|
+
previousHistory?: QualityGateMetricHistoryPoint[];
|
|
36
42
|
environment?: string;
|
|
37
|
-
}) => Promise<QualityGateRuleResult
|
|
43
|
+
}) => Promise<QualityGateRuleResult<K>>;
|
|
38
44
|
};
|
|
39
45
|
export type QualityGateConfig = {
|
|
40
46
|
rules?: QualityGateRules[];
|
package/dist/report.d.ts
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import type { AttachmentTestStepResult, CiDescriptor, DefaultTreeGroup, HistoryTestResult, ResolutionCategory, ResolutionIssue, TestFixtureResult, TestResult, TestStatus, TestStepResult, TreeData, WithChildren } from "@allurereport/core-api";
|
|
2
|
+
import type { QualityGateValidationResult } from "./qualityGate.js";
|
|
3
|
+
export type Layout = "base" | "split";
|
|
4
|
+
export type StepTreeExpansion = "collapsed" | "expand_failed_only" | "expanded";
|
|
5
|
+
export type ReportRunSummary = {
|
|
6
|
+
start: number;
|
|
7
|
+
stop: number;
|
|
8
|
+
duration: number;
|
|
9
|
+
};
|
|
10
|
+
export type ReportExecutorInfo = {
|
|
11
|
+
name?: string;
|
|
12
|
+
type?: string;
|
|
13
|
+
url?: string;
|
|
14
|
+
buildOrder?: number;
|
|
15
|
+
buildName?: string;
|
|
16
|
+
buildUrl?: string;
|
|
17
|
+
reportName?: string;
|
|
18
|
+
reportUrl?: string;
|
|
19
|
+
};
|
|
20
|
+
export type ReportOptions = {
|
|
21
|
+
id?: string;
|
|
22
|
+
allureVersion: string;
|
|
23
|
+
reportName?: string;
|
|
24
|
+
logo?: string;
|
|
25
|
+
theme?: "light" | "dark" | "auto";
|
|
26
|
+
groupBy?: string[];
|
|
27
|
+
reportLanguage?: string;
|
|
28
|
+
createdAt: number;
|
|
29
|
+
reportUuid: string;
|
|
30
|
+
layout?: Layout;
|
|
31
|
+
defaultSection?: string;
|
|
32
|
+
sections?: string[];
|
|
33
|
+
cacheKey?: string;
|
|
34
|
+
ci?: CiDescriptor;
|
|
35
|
+
executor?: ReportExecutorInfo;
|
|
36
|
+
runSummary?: ReportRunSummary;
|
|
37
|
+
stepTreeExpansion?: StepTreeExpansion;
|
|
38
|
+
defaultSortBy?: string;
|
|
39
|
+
};
|
|
40
|
+
export type ReportFixtureResult = Omit<TestFixtureResult, "testResultIds" | "start" | "stop" | "sourceMetadata" | "steps"> & {
|
|
41
|
+
steps: ReportTestStepResult[];
|
|
42
|
+
};
|
|
43
|
+
export type ReportStatus = TestStatus | "total";
|
|
44
|
+
export type ReportTestStepResult = TestStepResult;
|
|
45
|
+
type ReportBreadcrumbItem = string[] | string[][];
|
|
46
|
+
export interface ReportCategory {
|
|
47
|
+
id?: string;
|
|
48
|
+
name: string;
|
|
49
|
+
grouping?: {
|
|
50
|
+
key: string;
|
|
51
|
+
value?: string;
|
|
52
|
+
name?: string;
|
|
53
|
+
}[];
|
|
54
|
+
description?: string;
|
|
55
|
+
descriptionHtml?: string;
|
|
56
|
+
messageRegex?: string;
|
|
57
|
+
traceRegex?: string;
|
|
58
|
+
matchedStatuses?: TestStatus[];
|
|
59
|
+
flaky?: boolean;
|
|
60
|
+
}
|
|
61
|
+
export type ReportTestResult = Omit<TestResult, "runSelector" | "sourceMetadata" | "expectedResult" | "expectedResultHtml" | "precondition" | "preconditionHtml" | "steps" | "categories" | "environment"> & {
|
|
62
|
+
isRetry: boolean;
|
|
63
|
+
setup: ReportFixtureResult[];
|
|
64
|
+
teardown: ReportFixtureResult[];
|
|
65
|
+
steps: ReportTestStepResult[];
|
|
66
|
+
history: HistoryTestResult[];
|
|
67
|
+
retries?: TestResult[];
|
|
68
|
+
retriesCount?: number;
|
|
69
|
+
groupedLabels: Record<string, string[]>;
|
|
70
|
+
attachments?: AttachmentTestStepResult[];
|
|
71
|
+
breadcrumbs: ReportBreadcrumbItem[];
|
|
72
|
+
order?: number;
|
|
73
|
+
groupOrder?: number;
|
|
74
|
+
retry: boolean;
|
|
75
|
+
categories?: ReportCategory[];
|
|
76
|
+
environment?: string | "default";
|
|
77
|
+
resolutionIssue?: ResolutionIssue;
|
|
78
|
+
tooltips?: Record<string, string>;
|
|
79
|
+
time?: Record<string, string[]>;
|
|
80
|
+
extra?: {
|
|
81
|
+
severity: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
export type ReportTreeLeaf = Pick<ReportTestResult, "duration" | "name" | "start" | "status" | "groupOrder" | "flaky" | "transition" | "retry" | "retriesCount" | "resolution"> & {
|
|
85
|
+
nodeId: string;
|
|
86
|
+
id?: string;
|
|
87
|
+
transitionTooltip?: string;
|
|
88
|
+
tooltips?: Record<string, string>;
|
|
89
|
+
tags?: string[];
|
|
90
|
+
categories?: string[];
|
|
91
|
+
};
|
|
92
|
+
export type ReportTreeGroup = WithChildren & DefaultTreeGroup & {
|
|
93
|
+
nodeId: string;
|
|
94
|
+
};
|
|
95
|
+
export type ReportTree = TreeData<ReportTreeLeaf, ReportTreeGroup>;
|
|
96
|
+
export type ReportQualityGateValidationResult = QualityGateValidationResult & {
|
|
97
|
+
testResultsTree?: ReportTree;
|
|
98
|
+
};
|
|
99
|
+
export type ReportQualityGateResults = Record<string, ReportQualityGateValidationResult[]>;
|
|
100
|
+
export type ReportSearchDocument = {
|
|
101
|
+
id: string;
|
|
102
|
+
nodeId: string;
|
|
103
|
+
name: string;
|
|
104
|
+
fullName?: string;
|
|
105
|
+
historyId?: string;
|
|
106
|
+
labels?: string;
|
|
107
|
+
owner?: string;
|
|
108
|
+
tags?: string;
|
|
109
|
+
parameters?: string;
|
|
110
|
+
categories?: string;
|
|
111
|
+
statusMessage?: string;
|
|
112
|
+
links?: string;
|
|
113
|
+
};
|
|
114
|
+
export type ReportResolutionTestResult = Pick<ReportTreeLeaf, "nodeId" | "id" | "name" | "status" | "duration" | "flaky" | "transition" | "retry" | "retriesCount" | "resolution" | "tooltips"> & {
|
|
115
|
+
groupOrder?: number;
|
|
116
|
+
};
|
|
117
|
+
export type ReportResolutionGroup = {
|
|
118
|
+
id: string;
|
|
119
|
+
resolution: ResolutionCategory;
|
|
120
|
+
name: string;
|
|
121
|
+
comment?: string;
|
|
122
|
+
issue?: ResolutionIssue;
|
|
123
|
+
testResults: ReportResolutionTestResult[];
|
|
124
|
+
};
|
|
125
|
+
export type ReportResolutionCategories = {
|
|
126
|
+
groups: ReportResolutionGroup[];
|
|
127
|
+
};
|
|
128
|
+
export type ReportRecursiveTree = DefaultTreeGroup & {
|
|
129
|
+
nodeId: string;
|
|
130
|
+
leaves: ReportTreeLeaf[];
|
|
131
|
+
trees: ReportRecursiveTree[];
|
|
132
|
+
duration?: number;
|
|
133
|
+
groupOrder?: number;
|
|
134
|
+
minStart?: number;
|
|
135
|
+
};
|
|
136
|
+
export type ReportTestResultGroup = Pick<ReportTestResult, "name" | "fullName" | "groupOrder"> & {
|
|
137
|
+
testResults: ReportTestResult[];
|
|
138
|
+
};
|
|
139
|
+
export {};
|
package/dist/report.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReportFiles } from "./plugin.js";
|
|
2
|
+
export type ReportStaticManifest = Record<string, string>;
|
|
3
|
+
export type ReportStaticAssets = {
|
|
4
|
+
manifest: ReportStaticManifest;
|
|
5
|
+
files: ReadonlyMap<string, Buffer>;
|
|
6
|
+
};
|
|
7
|
+
export declare const readReportStaticAssets: (archive: string | URL) => Promise<ReportStaticAssets>;
|
|
8
|
+
export declare const getReportStaticAsset: (assets: ReportStaticAssets, fileName: string) => Buffer;
|
|
9
|
+
export declare const copyReportStaticAssets: (assets: ReportStaticAssets, reportFiles: ReportFiles) => Promise<void>;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { createReadStream } from "node:fs";
|
|
2
|
+
import { posix } from "node:path";
|
|
3
|
+
import { pipeline } from "node:stream/promises";
|
|
4
|
+
import { extract } from "tar-stream";
|
|
5
|
+
const validateEntryName = (name) => {
|
|
6
|
+
if (!name ||
|
|
7
|
+
name.includes("\0") ||
|
|
8
|
+
name.includes("\\") ||
|
|
9
|
+
posix.isAbsolute(name) ||
|
|
10
|
+
posix.normalize(name) !== name ||
|
|
11
|
+
name === ".." ||
|
|
12
|
+
name.startsWith("../")) {
|
|
13
|
+
throw new Error(`Unsafe report static archive entry: ${JSON.stringify(name)}`);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
const parseManifest = (content) => {
|
|
17
|
+
let manifest;
|
|
18
|
+
try {
|
|
19
|
+
manifest = JSON.parse(content.toString("utf8"));
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
throw new Error("The report static archive contains an invalid manifest.json", { cause: error });
|
|
23
|
+
}
|
|
24
|
+
if (!manifest || typeof manifest !== "object" || Array.isArray(manifest)) {
|
|
25
|
+
throw new Error("The report static archive manifest must be an object");
|
|
26
|
+
}
|
|
27
|
+
for (const [key, value] of Object.entries(manifest)) {
|
|
28
|
+
if (!key || typeof value !== "string") {
|
|
29
|
+
throw new Error("The report static archive manifest must map non-empty keys to file names");
|
|
30
|
+
}
|
|
31
|
+
validateEntryName(value);
|
|
32
|
+
}
|
|
33
|
+
return manifest;
|
|
34
|
+
};
|
|
35
|
+
export const readReportStaticAssets = async (archive) => {
|
|
36
|
+
const files = new Map();
|
|
37
|
+
const archiveExtractor = extract();
|
|
38
|
+
let archiveError;
|
|
39
|
+
archiveExtractor.on("entry", (header, stream, next) => {
|
|
40
|
+
const skipEntry = (error) => {
|
|
41
|
+
archiveError ?? (archiveError = error);
|
|
42
|
+
stream.on("end", next);
|
|
43
|
+
stream.resume();
|
|
44
|
+
};
|
|
45
|
+
if (header.type === "directory") {
|
|
46
|
+
stream.on("end", next);
|
|
47
|
+
stream.resume();
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
if (header.type !== "file") {
|
|
51
|
+
skipEntry(new Error(`Unsupported report static archive entry type: ${header.type}`));
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
try {
|
|
55
|
+
validateEntryName(header.name);
|
|
56
|
+
if (files.has(header.name)) {
|
|
57
|
+
throw new Error(`Duplicate report static archive entry: ${header.name}`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
skipEntry(error instanceof Error ? error : new Error(String(error)));
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const chunks = [];
|
|
65
|
+
stream.on("data", (chunk) => {
|
|
66
|
+
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
67
|
+
});
|
|
68
|
+
stream.on("error", (error) => archiveExtractor.destroy(error));
|
|
69
|
+
stream.on("end", () => {
|
|
70
|
+
files.set(header.name, Buffer.concat(chunks));
|
|
71
|
+
next();
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
await pipeline(createReadStream(archive), archiveExtractor);
|
|
75
|
+
if (archiveError) {
|
|
76
|
+
throw archiveError;
|
|
77
|
+
}
|
|
78
|
+
const manifestContent = files.get("manifest.json");
|
|
79
|
+
if (!manifestContent) {
|
|
80
|
+
throw new Error("The report static archive does not contain manifest.json");
|
|
81
|
+
}
|
|
82
|
+
files.delete("manifest.json");
|
|
83
|
+
const manifest = parseManifest(manifestContent);
|
|
84
|
+
if (!manifest["main.js"]) {
|
|
85
|
+
throw new Error('The report static archive manifest does not contain "main.js"');
|
|
86
|
+
}
|
|
87
|
+
for (const fileName of Object.values(manifest)) {
|
|
88
|
+
if (!files.has(fileName)) {
|
|
89
|
+
throw new Error(`The report static archive does not contain manifest asset: ${fileName}`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return { manifest, files };
|
|
93
|
+
};
|
|
94
|
+
export const getReportStaticAsset = (assets, fileName) => {
|
|
95
|
+
const content = assets.files.get(fileName);
|
|
96
|
+
if (!content) {
|
|
97
|
+
throw new Error(`The report static archive does not contain asset: ${fileName}`);
|
|
98
|
+
}
|
|
99
|
+
return content;
|
|
100
|
+
};
|
|
101
|
+
export const copyReportStaticAssets = async (assets, reportFiles) => {
|
|
102
|
+
for (const [fileName, content] of assets.files) {
|
|
103
|
+
await reportFiles.addFile(fileName, content);
|
|
104
|
+
}
|
|
105
|
+
};
|
package/dist/store.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AllureCheckResult, AttachmentLink, EnvironmentIdentity, GlobalAttachmentLink, HistoryDataPoint, HistoryTestResult,
|
|
1
|
+
import type { AllureCheckResult, AttachmentLink, EnvironmentIdentity, GlobalAttachmentLink, HistoryDataPoint, HistoryTestResult, ResolutionIssue, MetricSample, ReportVariables, Statistic, TestCase, TestEnvGroup, TestError, TestFixtureResult, TestResult } from "@allurereport/core-api";
|
|
2
2
|
import type { ExitCode, PluginGlobalError } from "./plugin.js";
|
|
3
3
|
import type { QualityGateValidationResult } from "./qualityGate.js";
|
|
4
4
|
import type { ResultFile } from "./resultFile.js";
|
|
@@ -21,7 +21,10 @@ export interface AllureStore {
|
|
|
21
21
|
allHistoryDataPoints: () => Promise<HistoryDataPoint[]>;
|
|
22
22
|
allHistoryDataPointsByEnvironment: (environment: string) => Promise<HistoryDataPoint[]>;
|
|
23
23
|
allHistoryDataPointsByEnvironmentId: (environmentId: string) => Promise<HistoryDataPoint[]>;
|
|
24
|
-
|
|
24
|
+
allResolutionIssues: () => Promise<ResolutionIssue[]>;
|
|
25
|
+
resolutionIssueByTestResultId: (trId: string) => Promise<ResolutionIssue | undefined>;
|
|
26
|
+
testResultsByResolutionIssueId: (resolutionIssueId: string) => Promise<TestResult[]>;
|
|
27
|
+
allMetrics: () => Promise<MetricSample[]>;
|
|
25
28
|
allNewTestResults: (filter?: TestResultFilter, history?: HistoryDataPoint[]) => Promise<TestResult[]>;
|
|
26
29
|
addCheckResult: (result: AllureCheckResult) => Promise<void>;
|
|
27
30
|
allCheckResults: () => Promise<AllureCheckResult[]>;
|
|
@@ -77,11 +80,13 @@ export interface AllureStoreDump {
|
|
|
77
80
|
fixtures: Record<string, TestFixtureResult>;
|
|
78
81
|
environments: Array<string | EnvironmentIdentity>;
|
|
79
82
|
reportVariables: ReportVariables;
|
|
80
|
-
|
|
83
|
+
resolutionIssues: Record<string, ResolutionIssue>;
|
|
81
84
|
qualityGateResults: QualityGateValidationResult[];
|
|
85
|
+
metrics?: MetricSample[];
|
|
82
86
|
indexAttachmentByTestResult: Record<string, string[]>;
|
|
83
87
|
indexTestResultByHistoryId: Record<string, string[]>;
|
|
84
88
|
indexTestResultByTestCase: Record<string, string[]>;
|
|
89
|
+
indexTestResultByResolutionIssue: Record<string, string[]>;
|
|
85
90
|
indexAttachmentByFixture: Record<string, string[]>;
|
|
86
91
|
indexFixturesByTestResult: Record<string, string[]>;
|
|
87
92
|
testResultIdsIngestOrder: string[];
|
|
@@ -96,12 +101,14 @@ export declare enum AllureStoreDumpFiles {
|
|
|
96
101
|
CheckResults = "check-results.json",
|
|
97
102
|
Environments = "environments.json",
|
|
98
103
|
ReportVariables = "report-variables.json",
|
|
99
|
-
|
|
104
|
+
ResolutionIssues = "resolution-issues.json",
|
|
100
105
|
IndexAttachmentsByTestResults = "index-attachments-by-test-results.json",
|
|
101
106
|
IndexTestResultsByHistoryId = "index-test-results-by-history-id.json",
|
|
102
107
|
IndexTestResultsByTestCase = "index-test-results-by-test-case.json",
|
|
108
|
+
IndexTestResultsByResolutionIssue = "index-test-results-by-resolution-issue.json",
|
|
103
109
|
IndexAttachmentsByFixture = "index-attachments-by-fixture.json",
|
|
104
110
|
IndexFixturesByTestResult = "index-fixtures-by-test-result.json",
|
|
105
111
|
QualityGateResults = "quality-gate-results.json",
|
|
106
|
-
TestResultIngestOrder = "test-result-ingest-order.json"
|
|
112
|
+
TestResultIngestOrder = "test-result-ingest-order.json",
|
|
113
|
+
Metrics = "metrics.json"
|
|
107
114
|
}
|
package/dist/store.js
CHANGED
|
@@ -9,12 +9,14 @@ export var AllureStoreDumpFiles;
|
|
|
9
9
|
AllureStoreDumpFiles["CheckResults"] = "check-results.json";
|
|
10
10
|
AllureStoreDumpFiles["Environments"] = "environments.json";
|
|
11
11
|
AllureStoreDumpFiles["ReportVariables"] = "report-variables.json";
|
|
12
|
-
AllureStoreDumpFiles["
|
|
12
|
+
AllureStoreDumpFiles["ResolutionIssues"] = "resolution-issues.json";
|
|
13
13
|
AllureStoreDumpFiles["IndexAttachmentsByTestResults"] = "index-attachments-by-test-results.json";
|
|
14
14
|
AllureStoreDumpFiles["IndexTestResultsByHistoryId"] = "index-test-results-by-history-id.json";
|
|
15
15
|
AllureStoreDumpFiles["IndexTestResultsByTestCase"] = "index-test-results-by-test-case.json";
|
|
16
|
+
AllureStoreDumpFiles["IndexTestResultsByResolutionIssue"] = "index-test-results-by-resolution-issue.json";
|
|
16
17
|
AllureStoreDumpFiles["IndexAttachmentsByFixture"] = "index-attachments-by-fixture.json";
|
|
17
18
|
AllureStoreDumpFiles["IndexFixturesByTestResult"] = "index-fixtures-by-test-result.json";
|
|
18
19
|
AllureStoreDumpFiles["QualityGateResults"] = "quality-gate-results.json";
|
|
19
20
|
AllureStoreDumpFiles["TestResultIngestOrder"] = "test-result-ingest-order.json";
|
|
21
|
+
AllureStoreDumpFiles["Metrics"] = "metrics.json";
|
|
20
22
|
})(AllureStoreDumpFiles || (AllureStoreDumpFiles = {}));
|
package/dist/utils/summary.js
CHANGED
|
@@ -4,6 +4,7 @@ export const convertToTestResultSummary = (tr) => ({
|
|
|
4
4
|
name: tr.name,
|
|
5
5
|
duration: tr.duration,
|
|
6
6
|
status: tr.status,
|
|
7
|
+
...(tr.environment ? { environment: tr.environment } : {}),
|
|
7
8
|
});
|
|
8
9
|
export const createTestResultRegistry = (testResults) => ({
|
|
9
10
|
byId: Object.fromEntries(testResults.map((testResult) => [testResult.id, convertToTestResultSummary(testResult)])),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/plugin-api",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.17.0",
|
|
4
4
|
"description": "Allure Plugin API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure"
|
|
@@ -9,14 +9,17 @@
|
|
|
9
9
|
"author": "Qameta Software",
|
|
10
10
|
"repository": "https://github.com/allure-framework/allure3",
|
|
11
11
|
"files": [
|
|
12
|
-
"dist"
|
|
12
|
+
"dist",
|
|
13
|
+
"!dist/packStaticAssets.d.ts",
|
|
14
|
+
"!dist/packStaticAssets.js"
|
|
13
15
|
],
|
|
14
16
|
"type": "module",
|
|
15
17
|
"main": "./dist/index.js",
|
|
16
18
|
"module": "./dist/index.js",
|
|
17
19
|
"types": "./dist/index.d.ts",
|
|
18
20
|
"exports": {
|
|
19
|
-
".": "./dist/index.js"
|
|
21
|
+
".": "./dist/index.js",
|
|
22
|
+
"./static-assets": "./dist/staticAssets.js"
|
|
20
23
|
},
|
|
21
24
|
"scripts": {
|
|
22
25
|
"build": "run clean && tsc --project ./tsconfig.json",
|
|
@@ -26,10 +29,12 @@
|
|
|
26
29
|
"lint:fix": "oxlint --import-plugin --fix src test features stories"
|
|
27
30
|
},
|
|
28
31
|
"dependencies": {
|
|
29
|
-
"@allurereport/core-api": "3.
|
|
32
|
+
"@allurereport/core-api": "3.17.0",
|
|
33
|
+
"tar-stream": "3.1.7"
|
|
30
34
|
},
|
|
31
35
|
"devDependencies": {
|
|
32
36
|
"@types/node": "^20",
|
|
37
|
+
"@types/tar-stream": "^3.1.4",
|
|
33
38
|
"@vitest/runner": "^2",
|
|
34
39
|
"@vitest/snapshot": "^2.1.9",
|
|
35
40
|
"allure-js-commons": "^3",
|