@allurereport/plugin-dashboard 3.2.0 → 3.3.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 -18
- package/package.json +6 -6
package/dist/plugin.js
CHANGED
|
@@ -10,8 +10,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
10
10
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
11
11
|
};
|
|
12
12
|
var _DashboardPlugin_writer, _DashboardPlugin_generate;
|
|
13
|
-
import {
|
|
14
|
-
import { convertToSummaryTestResult, } from "@allurereport/plugin-api";
|
|
13
|
+
import { createPluginSummary, } from "@allurereport/plugin-api";
|
|
15
14
|
import { generateAllCharts, generateEnvirontmentsList, generateStaticFiles } from "./generators.js";
|
|
16
15
|
import { InMemoryDashboardDataWriter, ReportFileDashboardDataWriter } from "./writer.js";
|
|
17
16
|
export class DashboardPlugin {
|
|
@@ -53,28 +52,18 @@ export class DashboardPlugin {
|
|
|
53
52
|
};
|
|
54
53
|
}
|
|
55
54
|
async info(context, store) {
|
|
56
|
-
|
|
57
|
-
const newTrs = await store.allNewTestResults(this.options.filter);
|
|
58
|
-
const retryTrs = allTrs.filter((tr) => !!tr?.retries?.length);
|
|
59
|
-
const flakyTrs = allTrs.filter((tr) => !!tr?.flaky);
|
|
60
|
-
const duration = allTrs.reduce((acc, { duration: trDuration = 0 }) => acc + trDuration, 0);
|
|
61
|
-
const worstStatus = getWorstStatus(allTrs.map(({ status }) => status));
|
|
62
|
-
const createdAt = allTrs.reduce((acc, { stop }) => Math.max(acc, stop || 0), 0);
|
|
63
|
-
return {
|
|
55
|
+
return createPluginSummary({
|
|
64
56
|
name: this.options.reportName || context.reportName,
|
|
65
|
-
stats: await store.testsStatistic(this.options.filter),
|
|
66
|
-
status: worstStatus ?? "passed",
|
|
67
|
-
duration,
|
|
68
|
-
createdAt,
|
|
69
57
|
plugin: "Dashboard",
|
|
70
|
-
newTests: newTrs.map(convertToSummaryTestResult),
|
|
71
|
-
flakyTests: flakyTrs.map(convertToSummaryTestResult),
|
|
72
|
-
retryTests: retryTrs.map(convertToSummaryTestResult),
|
|
73
58
|
meta: {
|
|
74
59
|
reportId: context.reportUuid,
|
|
75
60
|
singleFile: this.options.singleFile ?? false,
|
|
76
61
|
},
|
|
77
|
-
|
|
62
|
+
filter: this.options.filter,
|
|
63
|
+
history: context.history,
|
|
64
|
+
ci: context.ci,
|
|
65
|
+
store,
|
|
66
|
+
});
|
|
78
67
|
}
|
|
79
68
|
}
|
|
80
69
|
_DashboardPlugin_writer = new WeakMap(), _DashboardPlugin_generate = new WeakMap();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/plugin-dashboard",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "Allure Dashboard Plugin – plugin for generating dashboard with a mix of charts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"test": "rimraf ./out && vitest run"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@allurereport/charts-api": "3.
|
|
36
|
-
"@allurereport/core-api": "3.
|
|
37
|
-
"@allurereport/plugin-api": "3.
|
|
38
|
-
"@allurereport/web-commons": "3.
|
|
39
|
-
"@allurereport/web-dashboard": "3.
|
|
35
|
+
"@allurereport/charts-api": "3.3.0",
|
|
36
|
+
"@allurereport/core-api": "3.3.0",
|
|
37
|
+
"@allurereport/plugin-api": "3.3.0",
|
|
38
|
+
"@allurereport/web-commons": "3.3.0",
|
|
39
|
+
"@allurereport/web-dashboard": "3.3.0",
|
|
40
40
|
"d3-shape": "^3.2.0",
|
|
41
41
|
"handlebars": "^4.7.8"
|
|
42
42
|
},
|