UNPKG

3.35 kBTypeScriptView Raw
1/// <reference types="node" />
2export interface Attachment {
3 name: string;
4 type?: string;
5 source: string;
6}
7export interface AttachmentOptions {
8 contentType: ContentType | string;
9 encoding?: BufferEncoding;
10 fileExtension?: string;
11}
12export interface Label {
13 name: LabelName | string;
14 value: string;
15}
16export interface Link {
17 name?: string;
18 url: string;
19 type?: LinkType | string;
20}
21export type ParameterMode = "hidden" | "masked" | "default";
22export interface Parameter {
23 name: string;
24 value: string;
25 excluded?: boolean;
26 mode?: ParameterMode;
27}
28export type ParameterOptions = Pick<Parameter, "mode" | "excluded">;
29export interface StatusDetails {
30 message?: string;
31 trace?: string;
32}
33interface Executable {
34 name?: string;
35 status?: Status;
36 statusDetails: StatusDetails;
37 stage: Stage;
38 description?: string;
39 descriptionHtml?: string;
40 steps: StepResult[];
41 attachments: Attachment[];
42 parameters: Parameter[];
43 start?: number;
44 stop?: number;
45}
46export interface FixtureResult extends Executable {
47}
48export interface StepResult extends Executable {
49}
50export interface TestResult extends Executable {
51 uuid: string;
52 historyId?: string;
53 fullName?: string;
54 testCaseId?: string;
55 labels: Label[];
56 links: Link[];
57}
58export interface TestResultContainer {
59 uuid: string;
60 name?: string;
61 children: string[];
62 befores: FixtureResult[];
63 afters: FixtureResult[];
64}
65export type TestOrStepResult = StepResult | TestResult;
66export declare enum Status {
67 FAILED = "failed",
68 BROKEN = "broken",
69 PASSED = "passed",
70 SKIPPED = "skipped"
71}
72export declare const StatusByPriority: Status[];
73export declare enum Stage {
74 SCHEDULED = "scheduled",
75 RUNNING = "running",
76 FINISHED = "finished",
77 PENDING = "pending",
78 INTERRUPTED = "interrupted"
79}
80export declare enum LabelName {
81 ALLURE_ID = "ALLURE_ID",
82 /**
83 * @deprecated please use ALLURE_ID instead
84 */
85 AS_ID = "ALLURE_ID",
86 SUITE = "suite",
87 PARENT_SUITE = "parentSuite",
88 SUB_SUITE = "subSuite",
89 EPIC = "epic",
90 FEATURE = "feature",
91 STORY = "story",
92 SEVERITY = "severity",
93 TAG = "tag",
94 OWNER = "owner",
95 LEAD = "lead",
96 HOST = "host",
97 THREAD = "thread",
98 TEST_METHOD = "testMethod",
99 TEST_CLASS = "testClass",
100 PACKAGE = "package",
101 FRAMEWORK = "framework",
102 LANGUAGE = "language",
103 LAYER = "layer"
104}
105export declare enum Severity {
106 BLOCKER = "blocker",
107 CRITICAL = "critical",
108 NORMAL = "normal",
109 MINOR = "minor",
110 TRIVIAL = "trivial"
111}
112export declare enum ContentType {
113 TEXT = "text/plain",
114 XML = "application/xml",
115 HTML = "text/html",
116 CSV = "text/csv",
117 TSV = "text/tab-separated-values",
118 CSS = "text/css",
119 URI = "text/uri-list",
120 SVG = "image/svg+xml",
121 PNG = "image/png",
122 JSON = "application/json",
123 ZIP = "application/zip",
124 WEBM = "video/webm",
125 JPEG = "image/jpeg",
126 MP4 = "video/mp4",
127 IMAGEDIFF = "application/vnd.allure.image.diff"
128}
129export declare enum LinkType {
130 DEFAULT = "link",
131 ISSUE = "issue",
132 TMS = "tms"
133}
134export interface ImageDiffAttachment {
135 expected: string | undefined;
136 actual: string | undefined;
137 diff: string | undefined;
138 name: string;
139}
140export {};