@allurereport/plugin-classic 3.0.0-beta.16 → 3.0.0-beta.17
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/generators.js +22 -12
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.js +7 -0
- package/package.json +7 -7
package/dist/generators.js
CHANGED
|
@@ -213,18 +213,28 @@ export const generateStaticFiles = async (payload) => {
|
|
|
213
213
|
allureVersion,
|
|
214
214
|
cacheKey: now.toString(),
|
|
215
215
|
};
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
216
|
+
try {
|
|
217
|
+
const html = compile({
|
|
218
|
+
headTags: headTags.join("\n"),
|
|
219
|
+
bodyTags: bodyTags.join("\n"),
|
|
220
|
+
reportFilesScript: createReportDataScript(reportDataFiles),
|
|
221
|
+
reportOptions: JSON.stringify(reportOptions),
|
|
222
|
+
analyticsEnable: true,
|
|
223
|
+
allureVersion,
|
|
224
|
+
reportUuid,
|
|
225
|
+
reportName,
|
|
226
|
+
singleFile: payload.singleFile,
|
|
227
|
+
});
|
|
228
|
+
await reportFiles.addFile("index.html", Buffer.from(html, "utf8"));
|
|
229
|
+
}
|
|
230
|
+
catch (err) {
|
|
231
|
+
if (err instanceof RangeError) {
|
|
232
|
+
console.error("The report is too large to be generated in the single file mode!");
|
|
233
|
+
process.exit(1);
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
throw err;
|
|
237
|
+
}
|
|
228
238
|
};
|
|
229
239
|
export const generateTreeByCategories = async (writer, treeName, tests) => {
|
|
230
240
|
const visibleTests = tests.filter((test) => !test.hidden);
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type AllureStore, type Plugin, type PluginContext, type PluginSummary } from "@allurereport/plugin-api";
|
|
2
2
|
import type { ClassicPluginOptions } from "./model.js";
|
|
3
3
|
export declare class ClassicPlugin implements Plugin {
|
|
4
4
|
#private;
|
package/dist/plugin.js
CHANGED
|
@@ -11,6 +11,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
11
11
|
};
|
|
12
12
|
var _ClassicPlugin_writer, _ClassicPlugin_generate;
|
|
13
13
|
import { getWorstStatus } from "@allurereport/core-api";
|
|
14
|
+
import { convertToSummaryTestResult, } from "@allurereport/plugin-api";
|
|
14
15
|
import { preciseTreeLabels } from "@allurereport/plugin-api";
|
|
15
16
|
import { generateAttachmentsFiles, generateEnvironmentJson, generateHistoryDataPoints, generatePieChart, generateStaticFiles, generateStatistic, generateTestResults, generateTree, generateTreeByCategories, } from "./generators.js";
|
|
16
17
|
import { InMemoryReportDataWriter, ReportFileDataWriter } from "./writer.js";
|
|
@@ -74,6 +75,9 @@ export class ClassicPlugin {
|
|
|
74
75
|
}
|
|
75
76
|
async info(context, store) {
|
|
76
77
|
const allTrs = (await store.allTestResults()).filter(this.options.filter ? this.options.filter : () => true);
|
|
78
|
+
const newTrs = await store.allNewTestResults();
|
|
79
|
+
const retryTrs = allTrs.filter((tr) => !!tr?.retries?.length);
|
|
80
|
+
const flakyTrs = allTrs.filter((tr) => !!tr?.flaky);
|
|
77
81
|
const duration = allTrs.reduce((acc, { duration: trDuration = 0 }) => acc + trDuration, 0);
|
|
78
82
|
const worstStatus = getWorstStatus(allTrs.map(({ status }) => status));
|
|
79
83
|
const createdAt = allTrs.reduce((acc, { stop }) => Math.max(acc, stop || 0), 0);
|
|
@@ -84,6 +88,9 @@ export class ClassicPlugin {
|
|
|
84
88
|
createdAt,
|
|
85
89
|
duration,
|
|
86
90
|
plugin: "Classic",
|
|
91
|
+
newTests: newTrs.map(convertToSummaryTestResult),
|
|
92
|
+
flakyTests: flakyTrs.map(convertToSummaryTestResult),
|
|
93
|
+
retryTests: retryTrs.map(convertToSummaryTestResult),
|
|
87
94
|
};
|
|
88
95
|
}
|
|
89
96
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/plugin-classic",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.17",
|
|
4
4
|
"description": "The classic version of Allure HTML report",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"test": "rimraf ./out && vitest run"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@allurereport/core-api": "3.0.0-beta.
|
|
34
|
-
"@allurereport/plugin-api": "3.0.0-beta.
|
|
35
|
-
"@allurereport/web-awesome": "3.0.0-beta.
|
|
36
|
-
"@allurereport/web-classic": "3.0.0-beta.
|
|
37
|
-
"@allurereport/web-commons": "3.0.0-beta.
|
|
33
|
+
"@allurereport/core-api": "3.0.0-beta.17",
|
|
34
|
+
"@allurereport/plugin-api": "3.0.0-beta.17",
|
|
35
|
+
"@allurereport/web-awesome": "3.0.0-beta.17",
|
|
36
|
+
"@allurereport/web-classic": "3.0.0-beta.17",
|
|
37
|
+
"@allurereport/web-commons": "3.0.0-beta.17",
|
|
38
38
|
"d3-shape": "^3.2.0",
|
|
39
39
|
"handlebars": "^4.7.8"
|
|
40
40
|
},
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
47
47
|
"@typescript-eslint/parser": "^8.0.0",
|
|
48
48
|
"@vitest/runner": "^2.1.9",
|
|
49
|
-
"allure-vitest": "^3.0
|
|
49
|
+
"allure-vitest": "^3.3.0",
|
|
50
50
|
"eslint": "^8.57.0",
|
|
51
51
|
"eslint-config-prettier": "^9.1.0",
|
|
52
52
|
"eslint-plugin-import": "^2.29.1",
|