@allurereport/core-api 3.15.0 → 3.16.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/config.d.ts +0 -1
- package/dist/index.d.ts +1 -1
- package/dist/model.d.ts +2 -1
- package/dist/resolutions.d.ts +48 -0
- package/dist/utils/history.d.ts +0 -1
- package/dist/utils/history.js +0 -9
- package/package.json +1 -1
- package/dist/known.d.ts +0 -20
- /package/dist/{known.js → resolutions.js} +0 -0
package/dist/config.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export * from "./ci.js";
|
|
|
4
4
|
export * from "./gitFlow.js";
|
|
5
5
|
export type * from "./environment.js";
|
|
6
6
|
export type * from "./history.js";
|
|
7
|
-
export type * from "./
|
|
7
|
+
export type * from "./resolutions.js";
|
|
8
8
|
export type * from "./metadata.js";
|
|
9
9
|
export type * from "./model.js";
|
|
10
10
|
export type * from "./testCase.js";
|
package/dist/model.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { TestLabel, TestLink, TestParameter } from "./metadata.js";
|
|
2
|
+
import type { ResolutionCategory } from "./resolutions.js";
|
|
2
3
|
import type { TestCase } from "./testCase.js";
|
|
3
4
|
export type TestStatus = "failed" | "broken" | "passed" | "skipped" | "unknown";
|
|
4
5
|
export type AllureCheckStatus = "passed" | "failed";
|
|
@@ -47,7 +48,7 @@ export interface TestResult {
|
|
|
47
48
|
duration?: number;
|
|
48
49
|
flaky: boolean;
|
|
49
50
|
muted: boolean;
|
|
50
|
-
|
|
51
|
+
resolution?: ResolutionCategory;
|
|
51
52
|
transition?: TestStatusTransition;
|
|
52
53
|
retryHash?: string;
|
|
53
54
|
isRetry: boolean;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { TestError, TestStatus } from "./model.js";
|
|
2
|
+
export type ResolutionCategory = "issue" | "muted" | "accepted";
|
|
3
|
+
export interface ResolutionLinkTemplate {
|
|
4
|
+
nameTemplate?: string;
|
|
5
|
+
urlTemplate: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ResolutionMatcher {
|
|
8
|
+
messageRegexp?: string;
|
|
9
|
+
testCaseId?: string[];
|
|
10
|
+
retryHash?: string[];
|
|
11
|
+
environment?: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface IssueResolutionRule extends ResolutionMatcher {
|
|
14
|
+
resolution: "issue";
|
|
15
|
+
issue: {
|
|
16
|
+
id: string;
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
comment?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface IgnoredResolutionRule extends ResolutionMatcher {
|
|
22
|
+
resolution: "muted" | "accepted";
|
|
23
|
+
comment: string;
|
|
24
|
+
}
|
|
25
|
+
export type ResolutionRule = IssueResolutionRule | IgnoredResolutionRule;
|
|
26
|
+
export interface ResolutionsConfig {
|
|
27
|
+
knownIssuesPath?: string;
|
|
28
|
+
links?: Record<string, ResolutionLinkTemplate>;
|
|
29
|
+
rules: ResolutionRule[];
|
|
30
|
+
}
|
|
31
|
+
export interface ResolutionIssue {
|
|
32
|
+
id: string;
|
|
33
|
+
type: string;
|
|
34
|
+
comment?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface KnownIssueTestResult {
|
|
37
|
+
name: string;
|
|
38
|
+
fullName?: string;
|
|
39
|
+
environment?: string;
|
|
40
|
+
status: Extract<TestStatus, "failed" | "broken">;
|
|
41
|
+
error?: TestError;
|
|
42
|
+
}
|
|
43
|
+
export interface KnownIssueRecord extends ResolutionIssue {
|
|
44
|
+
testResults: Record<string, KnownIssueTestResult>;
|
|
45
|
+
}
|
|
46
|
+
export interface KnownIssuesFile {
|
|
47
|
+
resolutionIssues: KnownIssueRecord[];
|
|
48
|
+
}
|
package/dist/utils/history.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import type { TestResult } from "../model.js";
|
|
|
4
4
|
export declare const stringifyHistoryParams: (parameters?: TestParameter[]) => string;
|
|
5
5
|
export declare const getFallbackHistoryId: (tr: Pick<TestResult, "labels" | "parameters">) => string | undefined;
|
|
6
6
|
export declare const getHistoryIdCandidates: (tr: Pick<TestResult, "historyId" | "labels" | "parameters">) => string[];
|
|
7
|
-
export declare const filterUnknownByKnownIssues: (trs: TestResult[], knownIssueHistoryIds: ReadonlySet<string>) => TestResult[];
|
|
8
7
|
export declare const normalizeHistoryDataPoint: (historyDataPoint: HistoryDataPoint) => HistoryDataPoint;
|
|
9
8
|
export declare const normalizeHistoryDataPointUrls: (historyDataPoint: HistoryDataPoint) => HistoryDataPoint;
|
|
10
9
|
export declare const selectHistoryTestResults: (historyDataPoints: HistoryDataPoint[], historyIdCandidates: readonly string[]) => HistoryTestResult[];
|
package/dist/utils/history.js
CHANGED
|
@@ -37,15 +37,6 @@ export const getHistoryIdCandidates = (tr) => {
|
|
|
37
37
|
}
|
|
38
38
|
return result;
|
|
39
39
|
};
|
|
40
|
-
export const filterUnknownByKnownIssues = (trs, knownIssueHistoryIds) => {
|
|
41
|
-
return trs.filter((tr) => {
|
|
42
|
-
const historyIdCandidates = getHistoryIdCandidates(tr);
|
|
43
|
-
if (historyIdCandidates.length === 0) {
|
|
44
|
-
return true;
|
|
45
|
-
}
|
|
46
|
-
return historyIdCandidates.every((historyId) => !knownIssueHistoryIds.has(historyId));
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
40
|
export const normalizeHistoryDataPoint = (historyDataPoint) => ({
|
|
50
41
|
...historyDataPoint,
|
|
51
42
|
knownTestCaseIds: Array.isArray(historyDataPoint.knownTestCaseIds) ? historyDataPoint.knownTestCaseIds : [],
|
package/package.json
CHANGED
package/dist/known.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { TestLink } from "./metadata.js";
|
|
2
|
-
import type { TestError } from "./model.js";
|
|
3
|
-
export interface KnownIssueDecision {
|
|
4
|
-
reason: string;
|
|
5
|
-
links?: TestLink[];
|
|
6
|
-
}
|
|
7
|
-
export interface KnownTestFailure extends KnownIssueDecision {
|
|
8
|
-
historyId: string;
|
|
9
|
-
error?: TestError;
|
|
10
|
-
}
|
|
11
|
-
export interface KnownIssueDescriptor {
|
|
12
|
-
messageRegexp?: string;
|
|
13
|
-
testCaseId?: string;
|
|
14
|
-
retryHash?: string;
|
|
15
|
-
environmentId?: string;
|
|
16
|
-
decision: KnownIssueDecision;
|
|
17
|
-
}
|
|
18
|
-
export interface KnownIssuesConfig {
|
|
19
|
-
rules: KnownIssueDescriptor[];
|
|
20
|
-
}
|
|
File without changes
|