@allurereport/plugin-awesome 3.18.0 → 3.19.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/dist/categories.js +7 -5
- package/dist/converters.js +5 -2
- package/dist/generateTimeline.d.ts +1 -1
- package/dist/generateTimeline.js +3 -3
- package/dist/generators.js +8 -5
- package/dist/plugin.js +139 -93
- package/dist/static/report.tar +0 -0
- package/package.json +6 -6
package/dist/categories.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { EMPTY_VALUE, buildEnvironmentSortOrder, compareChildNodes, extractErrorMatchingData, findLastByLabelName, incrementStatistic, matchCategory, } from "@allurereport/core-api";
|
|
1
|
+
import { EMPTY_VALUE, buildEnvironmentSortOrder, calculateRetryHash, compareChildNodes, extractErrorMatchingData, findLastByLabelName, incrementStatistic, matchCategory, } from "@allurereport/core-api";
|
|
2
2
|
import { md5 } from "@allurereport/plugin-api";
|
|
3
3
|
const emptyStat = () => ({
|
|
4
4
|
total: 0,
|
|
5
5
|
});
|
|
6
6
|
const msgKey = (m) => (m && m.trim().length ? m : EMPTY_VALUE);
|
|
7
7
|
const envKey = (m) => (m && m.trim().length ? m : EMPTY_VALUE);
|
|
8
|
+
const environmentNeutralRetryHash = (testResult) => calculateRetryHash({ testCaseHash: testResult.testCaseHash, parametersHash: testResult.parametersHash }) ??
|
|
9
|
+
testResult.id;
|
|
8
10
|
const formatEmptyValue = (key) => {
|
|
9
11
|
if (key === "message") {
|
|
10
12
|
return "No message";
|
|
@@ -98,11 +100,11 @@ const buildGroupLevels = (category, testResult, matchingData, environmentCount,
|
|
|
98
100
|
}
|
|
99
101
|
const groupEnvironments = computeGroupEnvironments(category, environmentCount, isSingleEnvironmentSelected);
|
|
100
102
|
if (groupEnvironments) {
|
|
101
|
-
const testKeyValue = testResult
|
|
103
|
+
const testKeyValue = environmentNeutralRetryHash(testResult);
|
|
102
104
|
const testDisplayName = testResult.name ?? testKeyValue;
|
|
103
105
|
levels.push({
|
|
104
106
|
type: "history",
|
|
105
|
-
key: "
|
|
107
|
+
key: "retryHash",
|
|
106
108
|
value: testKeyValue,
|
|
107
109
|
name: testDisplayName,
|
|
108
110
|
});
|
|
@@ -165,14 +167,14 @@ export const generateCategories = async (writer, { tests, categories, filename =
|
|
|
165
167
|
let parentId = catId;
|
|
166
168
|
for (const level of levels) {
|
|
167
169
|
const levelId = `${level.type}:${md5(`${parentId}\n${level.key}\n${level.value}`)}`;
|
|
168
|
-
const
|
|
170
|
+
const retryHash = level.type === "history" ? level.value : undefined;
|
|
169
171
|
duplicateChecker({
|
|
170
172
|
id: levelId,
|
|
171
173
|
type: level.type,
|
|
172
174
|
name: level.name,
|
|
173
175
|
key: level.key,
|
|
174
176
|
value: level.value,
|
|
175
|
-
|
|
177
|
+
retryHash,
|
|
176
178
|
statistic: emptyStat(),
|
|
177
179
|
childrenIds: [],
|
|
178
180
|
});
|
package/dist/converters.js
CHANGED
|
@@ -21,7 +21,10 @@ export const convertTestResult = (tr, options = {}) => {
|
|
|
21
21
|
duration: tr.duration,
|
|
22
22
|
status: tr.status,
|
|
23
23
|
fullName: tr.fullName,
|
|
24
|
-
|
|
24
|
+
retryHash: tr.retryHash,
|
|
25
|
+
testCaseHash: tr.testCaseHash,
|
|
26
|
+
parametersHash: tr.parametersHash,
|
|
27
|
+
environmentHash: tr.environmentHash,
|
|
25
28
|
flaky: tr.flaky,
|
|
26
29
|
muted: tr.muted,
|
|
27
30
|
known: tr.known,
|
|
@@ -34,8 +37,8 @@ export const convertTestResult = (tr, options = {}) => {
|
|
|
34
37
|
links: tr.links,
|
|
35
38
|
steps: (tr.steps ?? []).map(convertTestStepResult),
|
|
36
39
|
error: tr.error,
|
|
40
|
+
errors: tr.errors,
|
|
37
41
|
testCase: tr.testCase,
|
|
38
|
-
retryHash: tr.retryHash,
|
|
39
42
|
descriptionHtml: tr.descriptionHtml ?? markdownToHtml(tr.description),
|
|
40
43
|
environment: tr.environment,
|
|
41
44
|
setup: [],
|
|
@@ -3,5 +3,5 @@ import type { AwesomeOptions } from "./model.js";
|
|
|
3
3
|
type Writer = {
|
|
4
4
|
writeWidget(fileName: string, data: any): Promise<void>;
|
|
5
5
|
};
|
|
6
|
-
export declare const generateTimeline: (writer: Writer, trs: TestResult[], options: AwesomeOptions, environmentIdByTrId: Map<string, string>) => Promise<void>;
|
|
6
|
+
export declare const generateTimeline: (writer: Writer, trs: TestResult[], options: AwesomeOptions, environmentIdByTrId: Map<string, string>, environmentNameById?: Map<string, string>) => Promise<void>;
|
|
7
7
|
export {};
|
package/dist/generateTimeline.js
CHANGED
|
@@ -2,7 +2,7 @@ const DEFAULT_MIN_DURATION = 1;
|
|
|
2
2
|
const DEFAULT_TIMELINE_OPTIONS = {
|
|
3
3
|
minDuration: DEFAULT_MIN_DURATION,
|
|
4
4
|
};
|
|
5
|
-
export const generateTimeline = async (writer, trs, options, environmentIdByTrId) => {
|
|
5
|
+
export const generateTimeline = async (writer, trs, options, environmentIdByTrId, environmentNameById = new Map()) => {
|
|
6
6
|
const { timeline = DEFAULT_TIMELINE_OPTIONS } = options;
|
|
7
7
|
const { minDuration = DEFAULT_MIN_DURATION } = timeline;
|
|
8
8
|
const result = [];
|
|
@@ -23,14 +23,14 @@ export const generateTimeline = async (writer, trs, options, environmentIdByTrId
|
|
|
23
23
|
}
|
|
24
24
|
result.push({
|
|
25
25
|
id: test.id,
|
|
26
|
-
|
|
26
|
+
retryHash: test.retryHash,
|
|
27
27
|
name: test.name,
|
|
28
28
|
status: test.status,
|
|
29
29
|
isRetry: test.isRetry,
|
|
30
30
|
host,
|
|
31
31
|
thread,
|
|
32
32
|
environment: environmentIdByTrId.get(test.id) ?? test.environment,
|
|
33
|
-
environmentName: test.environment,
|
|
33
|
+
environmentName: environmentNameById.get(test.environment ?? "") ?? test.environment,
|
|
34
34
|
start: test.start,
|
|
35
35
|
duration,
|
|
36
36
|
});
|
package/dist/generators.js
CHANGED
|
@@ -159,18 +159,21 @@ const searchDocumentFactory = (test) => {
|
|
|
159
159
|
});
|
|
160
160
|
const links = (test.links ?? []).flatMap(({ name, url, type }) => [name, url, type]);
|
|
161
161
|
const categories = test.categories?.map((category) => category.name);
|
|
162
|
+
const statusMessages = (test.errors?.length ? test.errors : test.error ? [test.error] : [])
|
|
163
|
+
.map((error) => error.message)
|
|
164
|
+
.filter(Boolean);
|
|
162
165
|
return {
|
|
163
166
|
id: test.id,
|
|
164
167
|
nodeId: test.id,
|
|
165
168
|
name: test.name,
|
|
166
169
|
fullName: test.fullName,
|
|
167
|
-
|
|
170
|
+
retryHash: test.retryHash,
|
|
168
171
|
labels: joinSearchValues(labels),
|
|
169
172
|
owner: joinSearchValues(test.groupedLabels.owner ?? []),
|
|
170
173
|
tags: joinSearchValues(tags),
|
|
171
174
|
parameters: joinSearchValues(parameters),
|
|
172
175
|
categories: joinSearchValues(categories ?? []),
|
|
173
|
-
statusMessage:
|
|
176
|
+
statusMessage: joinSearchValues(statusMessages),
|
|
174
177
|
links: joinSearchValues(links),
|
|
175
178
|
};
|
|
176
179
|
};
|
|
@@ -270,10 +273,10 @@ const buildTreeByTitlePath = (tests) => {
|
|
|
270
273
|
};
|
|
271
274
|
};
|
|
272
275
|
const buildTreeByLabelsAndTitlePathCombined = (tests, labels) => collapseTreeGroups(createTreeByLabelsAndTitlePath(tests, labels, leafFactory, undefined, (group, leaf) => incrementStatistic(group.statistic, leaf.status)));
|
|
273
|
-
const leafFactory = ({ id, name, status, duration, flaky, start, retry, retriesCount, resolution, transition, tooltips,
|
|
276
|
+
const leafFactory = ({ id, name, status, duration, flaky, start, retry, retriesCount, resolution, transition, tooltips, retryHash, groupedLabels, categories, }) => {
|
|
274
277
|
const leaf = {
|
|
275
278
|
nodeId: id,
|
|
276
|
-
id:
|
|
279
|
+
id: retryHash ?? id,
|
|
277
280
|
name,
|
|
278
281
|
status,
|
|
279
282
|
duration,
|
|
@@ -306,7 +309,7 @@ const getResolutionGroupName = (test) => {
|
|
|
306
309
|
};
|
|
307
310
|
const resolutionTestResultFactory = (test, index) => ({
|
|
308
311
|
nodeId: test.id,
|
|
309
|
-
id: test.
|
|
312
|
+
id: test.retryHash ?? test.id,
|
|
310
313
|
name: test.name,
|
|
311
314
|
status: test.status,
|
|
312
315
|
duration: test.duration,
|
package/dist/plugin.js
CHANGED
|
@@ -65,52 +65,86 @@ export class AwesomePlugin {
|
|
|
65
65
|
});
|
|
66
66
|
_AwesomePlugin_generate.set(this, async (context, store) => {
|
|
67
67
|
const { singleFile, groupBy = [], filter, appendTitlePath } = this.options ?? {};
|
|
68
|
+
const perf = context.perf;
|
|
69
|
+
const measure = (name, fn) => perf?.measure(name, fn) ?? fn();
|
|
68
70
|
const hideLabels = context.hideLabels;
|
|
69
71
|
const categories = context.categories ?? [];
|
|
70
|
-
const environmentItems = await
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
72
|
+
const { environmentItems, executor, attachments, allTrs, runSummary, statistics, environments, allTestEnvGroups, globalAttachments, globalAttachmentsByEnv, globalExitCode, globalErrors, globalErrorsByEnv, qualityGateResults, } = await measure("readData", async () => {
|
|
73
|
+
const testResults = await store.allTestResults({ includeRetries: true, filter });
|
|
74
|
+
return {
|
|
75
|
+
environmentItems: await store.metadataByKey("allure_environment"),
|
|
76
|
+
executor: await store.metadataByKey("allure2_executor"),
|
|
77
|
+
attachments: await store.allAttachments(),
|
|
78
|
+
allTrs: testResults,
|
|
79
|
+
runSummary: getRunSummary(testResults),
|
|
80
|
+
statistics: await store.testsStatistic(filter),
|
|
81
|
+
environments: await store.allEnvironmentIdentities(),
|
|
82
|
+
allTestEnvGroups: await store.allTestEnvGroups(),
|
|
83
|
+
globalAttachments: await store.allGlobalAttachments(),
|
|
84
|
+
globalAttachmentsByEnv: await store.allGlobalAttachmentsByEnv(),
|
|
85
|
+
globalExitCode: await store.globalExitCode(),
|
|
86
|
+
globalErrors: await store.allGlobalErrors(),
|
|
87
|
+
globalErrorsByEnv: await store.allGlobalErrorsByEnv(),
|
|
88
|
+
qualityGateResults: await store.qualityGateResultsByEnvironmentId(),
|
|
89
|
+
};
|
|
90
|
+
});
|
|
91
|
+
if (perf && attachments.length > 0) {
|
|
92
|
+
perf.count("attachments.count", attachments.length, {
|
|
93
|
+
title: "Attachments",
|
|
94
|
+
unit: "attachments",
|
|
95
|
+
group: "workload",
|
|
96
|
+
groupTitle: "Workload",
|
|
97
|
+
better: "neutral",
|
|
98
|
+
});
|
|
99
|
+
perf.count("attachmentBytes", attachments.reduce((total, attachment) => total + ("contentLength" in attachment ? (attachment.contentLength ?? 0) : 0), 0), {
|
|
100
|
+
title: "Attachment bytes",
|
|
101
|
+
unit: "bytes",
|
|
102
|
+
group: "workload",
|
|
103
|
+
groupTitle: "Workload",
|
|
104
|
+
better: "neutral",
|
|
105
|
+
});
|
|
106
|
+
}
|
|
87
107
|
const envIdByTrId = new Map();
|
|
88
|
-
await
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
108
|
+
await measure("environmentMap", async () => {
|
|
109
|
+
await Promise.all(allTrs.map(async (tr) => {
|
|
110
|
+
const environmentId = await store.environmentIdByTrId(tr.id);
|
|
111
|
+
if (!environmentId) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
envIdByTrId.set(tr.id, environmentId);
|
|
115
|
+
}));
|
|
116
|
+
});
|
|
95
117
|
const trsByEnvId = new Map();
|
|
96
|
-
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
118
|
+
await measure("stats", async () => {
|
|
119
|
+
const envStatistics = new Map();
|
|
120
|
+
const pieStatistics = await statisticByTestResults(store, allTrs.filter(isActiveStatisticTestResult));
|
|
121
|
+
const pieEnvStatistics = new Map();
|
|
122
|
+
for (const tr of allTrs) {
|
|
123
|
+
const environmentId = envIdByTrId.get(tr.id);
|
|
124
|
+
if (!environmentId) {
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
const group = trsByEnvId.get(environmentId);
|
|
128
|
+
if (group) {
|
|
129
|
+
group.push(tr);
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
trsByEnvId.set(environmentId, [tr]);
|
|
133
|
+
}
|
|
107
134
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
135
|
+
await Promise.all(environments.map(async ({ id }) => {
|
|
136
|
+
const envTrs = trsByEnvId.get(id) ?? [];
|
|
137
|
+
envStatistics.set(id, await statisticByTestResults(store, envTrs));
|
|
138
|
+
pieEnvStatistics.set(id, await statisticByTestResults(store, envTrs.filter(isActiveStatisticTestResult)));
|
|
139
|
+
}));
|
|
140
|
+
await generateStatistic(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), {
|
|
141
|
+
stats: statistics,
|
|
142
|
+
statsByEnv: envStatistics,
|
|
143
|
+
pieStats: pieStatistics,
|
|
144
|
+
pieStatsByEnv: pieEnvStatistics,
|
|
145
|
+
envs: environments,
|
|
146
|
+
});
|
|
147
|
+
});
|
|
114
148
|
const runSummaryByEnv = {};
|
|
115
149
|
for (const { id } of environments) {
|
|
116
150
|
const envRunSummary = getRunSummary(trsByEnvId.get(id) ?? []);
|
|
@@ -118,88 +152,98 @@ export class AwesomePlugin {
|
|
|
118
152
|
runSummaryByEnv[id] = envRunSummary;
|
|
119
153
|
}
|
|
120
154
|
}
|
|
121
|
-
await
|
|
122
|
-
stats: statistics,
|
|
123
|
-
statsByEnv: envStatistics,
|
|
124
|
-
pieStats: pieStatistics,
|
|
125
|
-
pieStatsByEnv: pieEnvStatistics,
|
|
126
|
-
envs: environments,
|
|
127
|
-
});
|
|
128
|
-
await generateAllCharts(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), store, this.options, context);
|
|
155
|
+
await measure("charts", () => generateAllCharts(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), store, this.options, context));
|
|
129
156
|
const hasMetrics = await generateMetricsWidget(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), store, context.reportUuid);
|
|
130
|
-
const convertedTrs = await generateTestResults(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), store, allTrs, {
|
|
157
|
+
const convertedTrs = await measure("convert", () => generateTestResults(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), store, allTrs, {
|
|
131
158
|
pluginId: context.id,
|
|
132
159
|
hideLabels,
|
|
133
160
|
resolveHistoryUrl: context.history?.resolveTestResultUrl,
|
|
161
|
+
}));
|
|
162
|
+
if (perf) {
|
|
163
|
+
perf.count("convertedTestResults.count", convertedTrs.length, {
|
|
164
|
+
title: "Converted test results",
|
|
165
|
+
unit: "test results",
|
|
166
|
+
group: "workload",
|
|
167
|
+
groupTitle: "Workload",
|
|
168
|
+
better: "neutral",
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
await measure("categories", async () => {
|
|
172
|
+
applyCategoriesToTestResults(convertedTrs, categories);
|
|
173
|
+
await generateCategories(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), {
|
|
174
|
+
tests: convertedTrs,
|
|
175
|
+
categories,
|
|
176
|
+
environmentCount: environments.length,
|
|
177
|
+
environments: environments.map(({ id }) => id),
|
|
178
|
+
defaultEnvironment: "default",
|
|
179
|
+
selectedEnvironmentCount: environments.length,
|
|
180
|
+
});
|
|
181
|
+
await generateResolutionCategories(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), convertedTrs);
|
|
134
182
|
});
|
|
135
|
-
applyCategoriesToTestResults(convertedTrs, categories);
|
|
136
|
-
await generateCategories(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), {
|
|
137
|
-
tests: convertedTrs,
|
|
138
|
-
categories,
|
|
139
|
-
environmentCount: environments.length,
|
|
140
|
-
environments: environments.map(({ name }) => name),
|
|
141
|
-
defaultEnvironment: "default",
|
|
142
|
-
selectedEnvironmentCount: environments.length,
|
|
143
|
-
});
|
|
144
|
-
await generateResolutionCategories(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), convertedTrs);
|
|
145
183
|
const hasGroupBy = groupBy.length > 0;
|
|
146
|
-
await generateTimeline(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), allTrs, this.options, envIdByTrId);
|
|
184
|
+
await measure("timeline", () => generateTimeline(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), allTrs, this.options, envIdByTrId, new Map(environments.map(({ id, name }) => [id, name]))));
|
|
147
185
|
const treeLabels = hasGroupBy
|
|
148
186
|
? preciseTreeLabels(groupBy, convertedTrs, ({ labels }) => labels.map(({ name }) => name))
|
|
149
187
|
: [];
|
|
150
188
|
await generateHistoryDataPoints(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), store);
|
|
151
|
-
await generateTestCases(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), convertedTrs);
|
|
152
|
-
await generateTree(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), "tree.json", treeLabels, convertedTrs, { appendTitlePath });
|
|
153
|
-
await generateNav(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), convertedTrs, "nav.json");
|
|
154
|
-
await generateSearchIndex(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), convertedTrs, "search-index.json");
|
|
155
|
-
await generateTestEnvGroups(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), allTestEnvGroups);
|
|
189
|
+
await measure("testCases", () => generateTestCases(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), convertedTrs));
|
|
190
|
+
await measure("tree", () => generateTree(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), "tree.json", treeLabels, convertedTrs, { appendTitlePath }));
|
|
191
|
+
await measure("nav", () => generateNav(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), convertedTrs, "nav.json"));
|
|
192
|
+
await measure("searchIndex", () => generateSearchIndex(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), convertedTrs, "search-index.json"));
|
|
193
|
+
await measure("testEnvGroups", () => generateTestEnvGroups(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), allTestEnvGroups));
|
|
156
194
|
const convertedTrsById = new Map(convertedTrs.map((tr) => [tr.id, tr]));
|
|
157
|
-
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
195
|
+
await measure("environmentsOutput", async () => {
|
|
196
|
+
for (const reportEnvironment of environments) {
|
|
197
|
+
const envTrs = await store.testResultsByEnvironmentId(reportEnvironment.id, { includeRetries: true });
|
|
198
|
+
const envConvertedTrs = envTrs
|
|
199
|
+
.map((tr) => convertedTrsById.get(tr.id))
|
|
200
|
+
.filter((tr) => Boolean(tr));
|
|
201
|
+
await generateTree(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), joinPosixPath(reportEnvironment.id, "tree.json"), treeLabels, envConvertedTrs, {
|
|
202
|
+
appendTitlePath,
|
|
203
|
+
});
|
|
204
|
+
await generateNav(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), envConvertedTrs, joinPosixPath(reportEnvironment.id, "nav.json"));
|
|
205
|
+
await generateSearchIndex(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), envConvertedTrs, joinPosixPath(reportEnvironment.id, "search-index.json"));
|
|
206
|
+
await generateCategories(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), {
|
|
207
|
+
tests: envConvertedTrs,
|
|
208
|
+
categories,
|
|
209
|
+
environmentCount: 1,
|
|
210
|
+
defaultEnvironment: "default",
|
|
211
|
+
selectedEnvironmentCount: 1,
|
|
212
|
+
filename: joinPosixPath(reportEnvironment.id, "categories.json"),
|
|
213
|
+
});
|
|
214
|
+
await generateResolutionCategories(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), envConvertedTrs, joinPosixPath(reportEnvironment.id, "resolution-categories.json"));
|
|
215
|
+
}
|
|
216
|
+
});
|
|
177
217
|
await generateTreeFilters(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), convertedTrs);
|
|
178
218
|
await generateEnvirontmentsList(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), store);
|
|
179
219
|
await generateVariables(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), store);
|
|
180
220
|
await generateEnvironmentJson(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), environmentItems ?? []);
|
|
181
221
|
if (attachments?.length) {
|
|
182
|
-
await generateAttachmentsFiles(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), attachments, (id) => store.attachmentContentById(id));
|
|
222
|
+
await measure("attachments", () => generateAttachmentsFiles(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), attachments, (id) => store.attachmentContentById(id)));
|
|
183
223
|
}
|
|
184
224
|
await generateQualityGateResults(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), qualityGateResults, {
|
|
185
225
|
tests: convertedTrs,
|
|
186
226
|
labels: treeLabels,
|
|
187
227
|
appendTitlePath,
|
|
188
228
|
});
|
|
189
|
-
await generateGlobals(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), {
|
|
229
|
+
await measure("globals", () => generateGlobals(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), {
|
|
190
230
|
globalAttachments,
|
|
191
231
|
globalAttachmentsByEnv,
|
|
192
232
|
globalErrors,
|
|
193
233
|
globalErrorsByEnv,
|
|
194
234
|
globalExitCode,
|
|
195
235
|
contentFunction: (id) => store.attachmentContentById(id),
|
|
196
|
-
});
|
|
197
|
-
const reportDataFiles = singleFile
|
|
236
|
+
}));
|
|
237
|
+
const reportDataFiles = !singleFile
|
|
238
|
+
? []
|
|
239
|
+
: perf
|
|
240
|
+
? await perf.measure("singleFileReportFiles", async () => __classPrivateFieldGet(this, _AwesomePlugin_writer, "f").reportFiles())
|
|
241
|
+
: __classPrivateFieldGet(this, _AwesomePlugin_writer, "f").reportFiles();
|
|
198
242
|
const configuredSections = this.options.sections ?? ["charts", "timeline"];
|
|
199
243
|
const sections = hasMetrics
|
|
200
244
|
? [...new Set([...configuredSections, "metrics"])]
|
|
201
245
|
: configuredSections.filter((section) => section !== "metrics");
|
|
202
|
-
await generateStaticFiles({
|
|
246
|
+
await measure("staticFiles", () => generateStaticFiles({
|
|
203
247
|
...this.options,
|
|
204
248
|
sections,
|
|
205
249
|
id: context.id,
|
|
@@ -212,7 +256,7 @@ export class AwesomePlugin {
|
|
|
212
256
|
runSummary,
|
|
213
257
|
runSummaryByEnv,
|
|
214
258
|
reportDataFiles,
|
|
215
|
-
});
|
|
259
|
+
}));
|
|
216
260
|
});
|
|
217
261
|
this.start = async (context) => {
|
|
218
262
|
const { singleFile } = this.options;
|
|
@@ -231,7 +275,8 @@ export class AwesomePlugin {
|
|
|
231
275
|
};
|
|
232
276
|
}
|
|
233
277
|
async info(context, store) {
|
|
234
|
-
|
|
278
|
+
const perf = context.perf;
|
|
279
|
+
const create = () => createPluginSummary({
|
|
235
280
|
name: this.options.reportName || context.reportName,
|
|
236
281
|
plugin: "Awesome",
|
|
237
282
|
meta: {
|
|
@@ -244,6 +289,7 @@ export class AwesomePlugin {
|
|
|
244
289
|
history: context.history,
|
|
245
290
|
store,
|
|
246
291
|
});
|
|
292
|
+
return perf?.measure("summary.create", create) ?? create();
|
|
247
293
|
}
|
|
248
294
|
}
|
|
249
295
|
_AwesomePlugin_writer = new WeakMap(), _AwesomePlugin_generateAfterStart = new WeakMap(), _AwesomePlugin_generate = new WeakMap();
|
package/dist/static/report.tar
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/plugin-awesome",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.19.1",
|
|
4
4
|
"description": "Allure Awesome Plugin – brand new HTML report with modern design and new features",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -30,16 +30,16 @@
|
|
|
30
30
|
"lint:fix": "oxlint --import-plugin --fix src test features stories"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@allurereport/charts-api": "3.
|
|
34
|
-
"@allurereport/core-api": "3.
|
|
35
|
-
"@allurereport/plugin-api": "3.
|
|
36
|
-
"@allurereport/web-commons": "3.
|
|
33
|
+
"@allurereport/charts-api": "3.19.1",
|
|
34
|
+
"@allurereport/core-api": "3.19.1",
|
|
35
|
+
"@allurereport/plugin-api": "3.19.1",
|
|
36
|
+
"@allurereport/web-commons": "3.19.1",
|
|
37
37
|
"d3-shape": "^3.2.0",
|
|
38
38
|
"handlebars": "^4.7.9",
|
|
39
39
|
"markdown-it": "^14.2.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@allurereport/web-awesome": "3.
|
|
42
|
+
"@allurereport/web-awesome": "3.19.1",
|
|
43
43
|
"@types/d3-shape": "^3.1.8",
|
|
44
44
|
"@types/markdown-it": "^14.1.2",
|
|
45
45
|
"@types/node": "^20",
|