@allurereport/plugin-api 3.11.0 → 3.13.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.d.ts +6 -1
- package/dist/utils/summary.d.ts +3 -2
- package/dist/utils/summary.js +7 -1
- package/package.json +2 -2
package/dist/plugin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AllureHistory, AttachmentLink, CategoryDefinition, CiDescriptor, HistoryDataPoint, Statistic, TestError, TestResult, TestStatus } from "@allurereport/core-api";
|
|
1
|
+
import type { AllureHistory, AttachmentLink, AllureCheckResult, CategoryDefinition, CiDescriptor, HistoryDataPoint, Statistic, TestError, TestResult, TestStatus } from "@allurereport/core-api";
|
|
2
2
|
import type { QualityGateValidationResult } from "./qualityGate.js";
|
|
3
3
|
import type { ResultFile } from "./resultFile.js";
|
|
4
4
|
import type { AllureStore } from "./store.js";
|
|
@@ -7,6 +7,9 @@ export interface PluginDescriptor {
|
|
|
7
7
|
enabled?: boolean;
|
|
8
8
|
options?: Record<string, any>;
|
|
9
9
|
}
|
|
10
|
+
export interface PluginConstructorContext {
|
|
11
|
+
enabled?: boolean;
|
|
12
|
+
}
|
|
10
13
|
export interface ReportFiles {
|
|
11
14
|
addFile(path: string, data: Buffer): Promise<string>;
|
|
12
15
|
}
|
|
@@ -32,6 +35,7 @@ export interface PluginContext {
|
|
|
32
35
|
history?: AllureHistory;
|
|
33
36
|
}
|
|
34
37
|
export type SummaryTestResult = Pick<TestResult, "name" | "id" | "status" | "duration">;
|
|
38
|
+
export type SummaryCheckResult = Pick<AllureCheckResult, "name" | "status">;
|
|
35
39
|
export interface PluginSummary {
|
|
36
40
|
href?: string;
|
|
37
41
|
remoteHref?: string;
|
|
@@ -46,6 +50,7 @@ export interface PluginSummary {
|
|
|
46
50
|
newTests?: SummaryTestResult[];
|
|
47
51
|
flakyTests?: SummaryTestResult[];
|
|
48
52
|
retryTests?: SummaryTestResult[];
|
|
53
|
+
checks?: SummaryCheckResult[];
|
|
49
54
|
createdAt?: number;
|
|
50
55
|
meta?: Record<string, any>;
|
|
51
56
|
}
|
package/dist/utils/summary.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { type AllureHistory, type CiDescriptor, type TestResult } from "@allurereport/core-api";
|
|
2
|
-
import type { PluginSummary, SummaryTestResult } from "../plugin.js";
|
|
1
|
+
import { AllureCheckResult, type AllureHistory, type CiDescriptor, type TestResult } from "@allurereport/core-api";
|
|
2
|
+
import type { PluginSummary, SummaryCheckResult, SummaryTestResult } from "../plugin.js";
|
|
3
3
|
import type { AllureStore } from "../store.js";
|
|
4
4
|
export declare const convertToSummaryTestResult: (tr: TestResult) => SummaryTestResult;
|
|
5
|
+
export declare const convertToSummaryCheckResult: (check: AllureCheckResult) => SummaryCheckResult;
|
|
5
6
|
export declare const createPluginSummary: (params: {
|
|
6
7
|
filter?: (testResult: TestResult) => boolean;
|
|
7
8
|
name: string;
|
package/dist/utils/summary.js
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import { getWorstStatus } from "@allurereport/core-api";
|
|
1
|
+
import { getWorstStatus, } from "@allurereport/core-api";
|
|
2
2
|
export const convertToSummaryTestResult = (tr) => ({
|
|
3
3
|
id: tr.id,
|
|
4
4
|
name: tr.name,
|
|
5
5
|
status: tr.status,
|
|
6
6
|
duration: tr.duration,
|
|
7
7
|
});
|
|
8
|
+
export const convertToSummaryCheckResult = (check) => ({
|
|
9
|
+
name: check.name,
|
|
10
|
+
status: check.status,
|
|
11
|
+
});
|
|
8
12
|
export const createPluginSummary = async (params) => {
|
|
9
13
|
const { name, filter, plugin, store, history, meta } = params;
|
|
14
|
+
const allChecks = await store.allCheckResults();
|
|
10
15
|
const allTrs = await store.allTestResults({ filter });
|
|
11
16
|
const mainBranchHistory = (await history?.readHistory?.({ branch: "" })) ?? [];
|
|
12
17
|
const newTrs = await store.allNewTestResults(filter, mainBranchHistory);
|
|
@@ -21,6 +26,7 @@ export const createPluginSummary = async (params) => {
|
|
|
21
26
|
newTests: newTrs.map(convertToSummaryTestResult),
|
|
22
27
|
flakyTests: flakyTrs.map(convertToSummaryTestResult),
|
|
23
28
|
retryTests: retryTrs.map(convertToSummaryTestResult),
|
|
29
|
+
checks: allChecks.map(convertToSummaryCheckResult),
|
|
24
30
|
name,
|
|
25
31
|
duration,
|
|
26
32
|
createdAt,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/plugin-api",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.13.0",
|
|
4
4
|
"description": "Allure Plugin API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"lint:fix": "oxlint --import-plugin --fix src test features stories"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@allurereport/core-api": "3.
|
|
29
|
+
"@allurereport/core-api": "3.13.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^20",
|