allure-cypress 2.14.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.
@@ -0,0 +1,156 @@
1
+ /// <reference types="node" />
2
+ export type ParameterOptions = Pick<Parameter, "mode" | "excluded">;
3
+ export interface Attachment {
4
+ name: string;
5
+ type: string;
6
+ source: string;
7
+ }
8
+ export type StepResult = ExecutableItem;
9
+ export interface ExecutableItem {
10
+ name?: string;
11
+ status?: Status;
12
+ statusDetails: StatusDetails;
13
+ stage: Stage;
14
+ description?: string;
15
+ descriptionHtml?: string;
16
+ steps: StepResult[];
17
+ attachments: Attachment[];
18
+ parameters: Parameter[];
19
+ start?: number;
20
+ stop?: number;
21
+ }
22
+ export interface StepMetadata extends Omit<ExecutableItem, "attachments" | "steps"> {
23
+ steps: StepMetadata[];
24
+ attachments: AttachmentMetadata[];
25
+ }
26
+ export interface Label {
27
+ name: LabelName | string;
28
+ value: string;
29
+ }
30
+ export interface Link {
31
+ name?: string;
32
+ url: string;
33
+ type?: LinkType | string;
34
+ }
35
+ export interface Parameter {
36
+ name: string;
37
+ value: string;
38
+ excluded?: boolean;
39
+ mode?: "hidden" | "masked" | "default";
40
+ }
41
+ export interface AttachmentMetadata {
42
+ name: string;
43
+ type: string;
44
+ content: string;
45
+ encoding: BufferEncoding;
46
+ }
47
+ export interface MetadataMessage {
48
+ attachments?: AttachmentMetadata[];
49
+ displayName?: string;
50
+ testCaseId?: string;
51
+ historyId?: string;
52
+ labels?: Label[];
53
+ links?: Link[];
54
+ parameter?: Parameter[];
55
+ description?: string;
56
+ descriptionHtml?: string;
57
+ steps?: StepMetadata[];
58
+ }
59
+ export declare enum LinkType {
60
+ ISSUE = "issue",
61
+ TMS = "tms"
62
+ }
63
+ export declare enum LabelName {
64
+ ALLURE_ID = "ALLURE_ID",
65
+ /**
66
+ * @deprecated please use ALLURE_ID instead
67
+ */
68
+ AS_ID = "ALLURE_ID",
69
+ SUITE = "suite",
70
+ PARENT_SUITE = "parentSuite",
71
+ SUB_SUITE = "subSuite",
72
+ EPIC = "epic",
73
+ FEATURE = "feature",
74
+ STORY = "story",
75
+ SEVERITY = "severity",
76
+ TAG = "tag",
77
+ OWNER = "owner",
78
+ LEAD = "lead",
79
+ HOST = "host",
80
+ THREAD = "thread",
81
+ TEST_METHOD = "testMethod",
82
+ TEST_CLASS = "testClass",
83
+ PACKAGE = "package",
84
+ FRAMEWORK = "framework",
85
+ LANGUAGE = "language",
86
+ LAYER = "layer"
87
+ }
88
+ export interface StatusDetails {
89
+ message?: string;
90
+ trace?: string;
91
+ }
92
+ export declare enum Status {
93
+ FAILED = "failed",
94
+ BROKEN = "broken",
95
+ PASSED = "passed",
96
+ SKIPPED = "skipped"
97
+ }
98
+ export declare enum Stage {
99
+ SCHEDULED = "scheduled",
100
+ RUNNING = "running",
101
+ FINISHED = "finished",
102
+ PENDING = "pending",
103
+ INTERRUPTED = "interrupted"
104
+ }
105
+ export declare enum MessageType {
106
+ TEST_STARTED = "TEST_STARTED",
107
+ TEST_ENDED = "TEST_ENDED",
108
+ STEP_STARTED = "STEP_STARTED",
109
+ STEP_ENDED = "STEP_ENDED",
110
+ METADATA = "METADATA",
111
+ SCREENSHOT = "SCREENSHOT"
112
+ }
113
+ export type TestStartMessage = {
114
+ specPath: string[];
115
+ filename: string;
116
+ start: number;
117
+ };
118
+ export type TestEndMessage = {
119
+ stage: Stage;
120
+ status: Status;
121
+ statusDetails?: StatusDetails;
122
+ stop: number;
123
+ };
124
+ export type StepStartMessage = {
125
+ type: MessageType.STEP_STARTED;
126
+ payload: {
127
+ name: string;
128
+ start: number;
129
+ };
130
+ };
131
+ export type StepEndMessage = {
132
+ type: MessageType.STEP_ENDED;
133
+ payload: {
134
+ status: Status;
135
+ statusDetails?: StatusDetails;
136
+ stage?: Stage;
137
+ stop: number;
138
+ };
139
+ };
140
+ export type ScreenshotMessage = {
141
+ type: MessageType.SCREENSHOT;
142
+ payload: {
143
+ path: string;
144
+ name: string;
145
+ };
146
+ };
147
+ export type MetadataSentMessage = {
148
+ type: MessageType.METADATA;
149
+ payload: MetadataMessage;
150
+ };
151
+ export type ReporterMessage = StepStartMessage | StepEndMessage | MetadataSentMessage | ScreenshotMessage;
152
+ export type ReportFinalMessage = {
153
+ startMessage: TestStartMessage;
154
+ endMessage: TestEndMessage;
155
+ messages: ReporterMessage[];
156
+ };
@@ -0,0 +1,9 @@
1
+ import Cypress from "cypress";
2
+ export type AllureCypressConfig = {
3
+ resultsDir?: string;
4
+ links?: {
5
+ type: string;
6
+ urlTemplate: string;
7
+ }[];
8
+ };
9
+ export declare const allureCypress: (on: Cypress.PluginEvents, config?: AllureCypressConfig) => void;