@allurereport/plugin-awesome 3.6.1 → 3.7.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/plugin.js +7 -22
- package/package.json +6 -6
package/dist/plugin.js
CHANGED
|
@@ -23,7 +23,6 @@ const statisticByTestResults = async (store, testResults) => {
|
|
|
23
23
|
if (testResult.hidden) {
|
|
24
24
|
continue;
|
|
25
25
|
}
|
|
26
|
-
statistic.total++;
|
|
27
26
|
incrementStatistic(statistic, testResult.status);
|
|
28
27
|
if ((await store.retriesByTrId(testResult.id)).length > 0) {
|
|
29
28
|
statistic.retries = (statistic.retries ?? 0) + 1;
|
|
@@ -58,24 +57,17 @@ export class AwesomePlugin {
|
|
|
58
57
|
const globalErrors = await store.allGlobalErrors();
|
|
59
58
|
const globalErrorsByEnv = await store.allGlobalErrorsByEnv();
|
|
60
59
|
const qualityGateResults = await store.qualityGateResultsByEnvironmentId();
|
|
61
|
-
const envResultsById = new Map();
|
|
62
60
|
const envIdByTrId = new Map();
|
|
63
|
-
environments.forEach(({ id }) => {
|
|
64
|
-
envResultsById.set(id, []);
|
|
65
|
-
});
|
|
66
61
|
await Promise.all(allTrs.map(async (tr) => {
|
|
67
62
|
const environmentId = await store.environmentIdByTrId(tr.id);
|
|
68
63
|
if (!environmentId) {
|
|
69
64
|
return;
|
|
70
65
|
}
|
|
71
66
|
envIdByTrId.set(tr.id, environmentId);
|
|
72
|
-
if (!envResultsById.has(environmentId)) {
|
|
73
|
-
envResultsById.set(environmentId, []);
|
|
74
|
-
}
|
|
75
|
-
envResultsById.get(environmentId).push(tr);
|
|
76
67
|
}));
|
|
77
68
|
await Promise.all(environments.map(async ({ id }) => {
|
|
78
|
-
|
|
69
|
+
const envTrs = await store.testResultsByEnvironmentId(id, { includeHidden: true });
|
|
70
|
+
envStatistics.set(id, await statisticByTestResults(store, envTrs));
|
|
79
71
|
}));
|
|
80
72
|
await generateStatistic(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), {
|
|
81
73
|
stats: statistics,
|
|
@@ -103,19 +95,12 @@ export class AwesomePlugin {
|
|
|
103
95
|
await generateTree(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), "tree.json", treeLabels, convertedTrs, { appendTitlePath });
|
|
104
96
|
await generateNav(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), convertedTrs, "nav.json");
|
|
105
97
|
await generateTestEnvGroups(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), allTestEnvGroups);
|
|
106
|
-
const
|
|
107
|
-
convertedTrs.forEach((tr) => {
|
|
108
|
-
const environmentId = envIdByTrId.get(tr.id);
|
|
109
|
-
if (!environmentId) {
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
if (!envConvertedTrsById.has(environmentId)) {
|
|
113
|
-
envConvertedTrsById.set(environmentId, []);
|
|
114
|
-
}
|
|
115
|
-
envConvertedTrsById.get(environmentId).push(tr);
|
|
116
|
-
});
|
|
98
|
+
const convertedTrsById = new Map(convertedTrs.map((tr) => [tr.id, tr]));
|
|
117
99
|
for (const reportEnvironment of environments) {
|
|
118
|
-
const
|
|
100
|
+
const envTrs = await store.testResultsByEnvironmentId(reportEnvironment.id, { includeHidden: true });
|
|
101
|
+
const envConvertedTrs = envTrs
|
|
102
|
+
.map((tr) => convertedTrsById.get(tr.id))
|
|
103
|
+
.filter((tr) => Boolean(tr));
|
|
119
104
|
await generateTree(__classPrivateFieldGet(this, _AwesomePlugin_writer, "f"), joinPosixPath(reportEnvironment.id, "tree.json"), treeLabels, envConvertedTrs, {
|
|
120
105
|
appendTitlePath,
|
|
121
106
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/plugin-awesome",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"description": "Allure Awesome Plugin – brand new HTML report with modern design and new features",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -30,11 +30,11 @@
|
|
|
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-awesome": "3.
|
|
37
|
-
"@allurereport/web-commons": "3.
|
|
33
|
+
"@allurereport/charts-api": "3.7.0",
|
|
34
|
+
"@allurereport/core-api": "3.7.0",
|
|
35
|
+
"@allurereport/plugin-api": "3.7.0",
|
|
36
|
+
"@allurereport/web-awesome": "3.7.0",
|
|
37
|
+
"@allurereport/web-commons": "3.7.0",
|
|
38
38
|
"d3-shape": "^3.2.0",
|
|
39
39
|
"handlebars": "^4.7.9",
|
|
40
40
|
"markdown-it": "^14.1.0"
|