1 |
|
2 | import { AllureRuntime } from "./AllureRuntime.js";
|
3 | import { AttachmentMetadata, ContentType, ExecutableItem, MetadataMessage, ParameterOptions, StepMetadata } from "./model.js";
|
4 | export type StepBodyFunction<T = any> = (this: AllureCommandStepExecutable, step: AllureCommandStepExecutable) => T | Promise<T>;
|
5 | export interface AllureCommandStep<T = MetadataMessage> {
|
6 | name: string;
|
7 | attachments: AttachmentMetadata[];
|
8 | metadata: T;
|
9 | label(label: string, value: string): void | Promise<void>;
|
10 | link(url: string, name?: string, type?: string): void | Promise<void>;
|
11 | parameter(name: string, value: string, options?: ParameterOptions): void | Promise<void>;
|
12 | epic(epic: string): void | Promise<void>;
|
13 | feature(feature: string): void | Promise<void>;
|
14 | story(story: string): void | Promise<void>;
|
15 | suite(name: string): void | Promise<void>;
|
16 | parentSuite(name: string): void | Promise<void>;
|
17 | subSuite(name: string): void | Promise<void>;
|
18 | owner(owner: string): void | Promise<void>;
|
19 | severity(severity: string): void | Promise<void>;
|
20 | tag(tag: string): void | Promise<void>;
|
21 | issue(issue: string, url: string): void | Promise<void>;
|
22 | tms(issue: string, url: string): void | Promise<void>;
|
23 | attach(name: string, content: Buffer | string, options: ContentType | string): void | Promise<void>;
|
24 | description(content: string): void | Promise<void>;
|
25 | }
|
26 | export declare class AllureCommandStepExecutable implements AllureCommandStep {
|
27 | name: string;
|
28 | attachments: AttachmentMetadata[];
|
29 | metadata: MetadataMessage;
|
30 | constructor(name: string);
|
31 | static toExecutableItem(runtime: AllureRuntime, stepMetadata: StepMetadata): ExecutableItem;
|
32 | label(label: string, value: string): void;
|
33 | link(url: string, name?: string, type?: string): void;
|
34 | parameter(name: string, value: any, options?: ParameterOptions): void;
|
35 | epic(epic: string): void;
|
36 | feature(feature: string): void;
|
37 | story(story: string): void;
|
38 | suite(name: string): void;
|
39 | parentSuite(name: string): void;
|
40 | subSuite(name: string): void;
|
41 | owner(owner: string): void;
|
42 | severity(severity: string): void;
|
43 | tag(tag: string): void;
|
44 | issue(name: string, url: string): void;
|
45 | tms(name: string, url: string): void;
|
46 | attach(content: string | Buffer, type: string): void;
|
47 | description(content: string): void;
|
48 | step(name: string, body: StepBodyFunction): Promise<void>;
|
49 | start(body: StepBodyFunction): Promise<MetadataMessage>;
|
50 | run(body: StepBodyFunction, messageEmitter: (message: MetadataMessage) => Promise<void>): Promise<void>;
|
51 | }
|