@allurereport/ci 3.20.1 → 3.21.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/reportMarkdown.js +4 -3
- package/package.json +6 -3
package/dist/reportMarkdown.js
CHANGED
|
@@ -117,8 +117,9 @@ const renderTable = (rows, includeResolutions, options) => {
|
|
|
117
117
|
return [`| ${headers.join(" | ")} |`, `| ${divider.join(" | ")} |`, ...body.map((row) => `| ${row} |`)].join("\n");
|
|
118
118
|
};
|
|
119
119
|
const reportHref = (report) => report.remoteHref ?? report.href;
|
|
120
|
-
const reportLabel = (report) => report.plugin ?? report.name;
|
|
121
120
|
const isAwesomeReport = (report) => report?.pluginId?.toLowerCase() === "awesome" || report?.plugin?.toLowerCase() === "awesome";
|
|
121
|
+
const isAllureTestOpsReport = (report) => report?.pluginId?.toLowerCase() === "testops";
|
|
122
|
+
const reportLabel = (report) => isAllureTestOpsReport(report) ? report.name : (report.plugin ?? report.name);
|
|
122
123
|
const appendReportFilter = (href, filter) => {
|
|
123
124
|
const hashIndex = href.indexOf("#");
|
|
124
125
|
const base = hashIndex === -1 ? href : href.slice(0, hashIndex);
|
|
@@ -135,7 +136,7 @@ const createDefaultReportFilterHref = (reports) => {
|
|
|
135
136
|
return href ? appendReportFilter(href, filter) : undefined;
|
|
136
137
|
};
|
|
137
138
|
};
|
|
138
|
-
const reportLinkKind = (report) => report
|
|
139
|
+
const reportLinkKind = (report) => isAllureTestOpsReport(report) ? "testops" : "report";
|
|
139
140
|
const toReportLink = (report) => {
|
|
140
141
|
const href = reportHref(report);
|
|
141
142
|
return href
|
|
@@ -157,7 +158,7 @@ const renderReportLinks = (reports) => {
|
|
|
157
158
|
const links = sortLinks(reports.map(toReportLink).filter((item) => item !== undefined));
|
|
158
159
|
const reportLinks = links.filter(({ kind }) => kind === "report");
|
|
159
160
|
const testOpsLinks = links.filter(({ kind }) => kind === "testops");
|
|
160
|
-
return [renderLinks("Reports", reportLinks), renderLinks("TestOps", testOpsLinks)].filter((line) => line !== undefined);
|
|
161
|
+
return [renderLinks("Reports", reportLinks), renderLinks("Allure TestOps", testOpsLinks)].filter((line) => line !== undefined);
|
|
161
162
|
};
|
|
162
163
|
const pluginSummaryToStatusStats = (report) => ({
|
|
163
164
|
failed: report.stats.failed ?? 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/ci",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.21.0",
|
|
4
4
|
"description": "Utilities set to get useful report data from different CI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -28,17 +28,20 @@
|
|
|
28
28
|
"build": "run clean && tsc --project ./tsconfig.json",
|
|
29
29
|
"clean": "rimraf ./dist",
|
|
30
30
|
"test": "rimraf ./out && vitest run",
|
|
31
|
+
"test:unit": "yarn test",
|
|
31
32
|
"lint": "oxlint --import-plugin src test features stories",
|
|
32
33
|
"lint:fix": "oxlint --import-plugin --fix src test features stories"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
|
-
"@allurereport/core-api": "3.
|
|
36
|
-
"@allurereport/plugin-api": "3.
|
|
36
|
+
"@allurereport/core-api": "3.21.0",
|
|
37
|
+
"@allurereport/plugin-api": "3.21.0",
|
|
37
38
|
"axios": "^1.20.0",
|
|
38
39
|
"glob": "^13.0.6"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
42
|
+
"@allurereport/test-config": "3.21.0",
|
|
41
43
|
"@types/node": "^20",
|
|
44
|
+
"@vitest/coverage-istanbul": "^4.1.0",
|
|
42
45
|
"@vitest/runner": "^2.1.8",
|
|
43
46
|
"@vitest/snapshot": "^5.0.1",
|
|
44
47
|
"allure-js-commons": "^3",
|