@allurereport/plugin-allure2 3.2.0 → 3.3.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/plugin.js +6 -18
- package/package.json +4 -4
package/dist/plugin.js
CHANGED
|
@@ -4,8 +4,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
6
|
var _Allure2Plugin_generate;
|
|
7
|
-
import {
|
|
8
|
-
import { convertToSummaryTestResult, preciseTreeLabels, } from "@allurereport/plugin-api";
|
|
7
|
+
import { createPluginSummary, preciseTreeLabels, } from "@allurereport/plugin-api";
|
|
9
8
|
import { convertTestResult } from "./converters.js";
|
|
10
9
|
import { generateAttachmentsData, generateCategoriesData, generateDefaultWidgetData, generateEmptyTrendData, generateEnvironmentJson, generateExecutorJson, generatePackagesData, generateStaticFiles, generateSummaryJson, generateTestResults, generateTimelineData, generateTree, generateTrendData, } from "./generators.js";
|
|
11
10
|
import { InMemoryReportDataWriter, ReportFileDataWriter } from "./writer.js";
|
|
@@ -74,29 +73,18 @@ export class Allure2Plugin {
|
|
|
74
73
|
};
|
|
75
74
|
}
|
|
76
75
|
async info(context, store) {
|
|
77
|
-
|
|
78
|
-
const newTrs = await store.allNewTestResults();
|
|
79
|
-
const retryTrs = allTrs.filter((tr) => !!tr?.retries?.length);
|
|
80
|
-
const flakyTrs = allTrs.filter((tr) => !!tr?.flaky);
|
|
81
|
-
const duration = allTrs.reduce((acc, { duration: trDuration = 0 }) => acc + trDuration, 0);
|
|
82
|
-
const worstStatus = getWorstStatus(allTrs.map(({ status }) => status));
|
|
83
|
-
const createdAt = allTrs.reduce((acc, { stop }) => Math.max(acc, stop || 0), 0);
|
|
84
|
-
return {
|
|
76
|
+
return createPluginSummary({
|
|
85
77
|
name: this.options.reportName || context.reportName,
|
|
86
|
-
stats: await store.testsStatistic(),
|
|
87
|
-
status: worstStatus ?? "passed",
|
|
88
|
-
duration,
|
|
89
|
-
createdAt,
|
|
90
78
|
plugin: "Allure2",
|
|
91
|
-
newTests: newTrs.map(convertToSummaryTestResult),
|
|
92
|
-
flakyTests: flakyTrs.map(convertToSummaryTestResult),
|
|
93
|
-
retryTests: retryTrs.map(convertToSummaryTestResult),
|
|
94
79
|
meta: {
|
|
95
80
|
reportId: context.reportUuid,
|
|
96
81
|
singleFile: this.options.singleFile ?? false,
|
|
97
82
|
withTestResultsLinks: true,
|
|
98
83
|
},
|
|
99
|
-
|
|
84
|
+
history: context.history,
|
|
85
|
+
ci: context.ci,
|
|
86
|
+
store,
|
|
87
|
+
});
|
|
100
88
|
}
|
|
101
89
|
}
|
|
102
90
|
_Allure2Plugin_generate = new WeakMap();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/plugin-allure2",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"description": "The classic version of Allure HTML report",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"test": "rimraf ./out && vitest run"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@allurereport/core-api": "3.
|
|
34
|
-
"@allurereport/plugin-api": "3.
|
|
35
|
-
"@allurereport/web-allure2": "3.
|
|
33
|
+
"@allurereport/core-api": "3.3.1",
|
|
34
|
+
"@allurereport/plugin-api": "3.3.1",
|
|
35
|
+
"@allurereport/web-allure2": "3.3.1",
|
|
36
36
|
"handlebars": "^4.7.8"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|