UNPKG

1.95 kBTypeScriptView Raw
1/// <reference types="node" />
2import { AllureRuntime } from "./AllureRuntime.js";
3import { AllureTest } from "./AllureTest.js";
4import { ExecutableItemWrapper } from "./ExecutableItemWrapper.js";
5import { AllureRuntimeApiInterface } from "./framework/index.js";
6import { AttachmentOptions, Category, ContentType, ParameterOptions, Status } from "./model.js";
7export declare abstract class Allure implements Omit<AllureRuntimeApiInterface, "step" | "attachment"> {
8 protected runtime: AllureRuntime;
9 protected abstract get currentTest(): AllureTest;
10 protected abstract get currentExecutable(): ExecutableItemWrapper;
11 protected constructor(runtime: AllureRuntime);
12 testCaseId(id: string): void;
13 historyId(id: string): void;
14 epic(epic: string): void;
15 feature(feature: string): void;
16 story(story: string): void;
17 suite(name: string): void;
18 parentSuite(name: string): void;
19 subSuite(name: string): void;
20 label(name: string, value: string): void;
21 parameter(name: string, value: any, options?: ParameterOptions): void;
22 link(url: string, name?: string, type?: string): void;
23 issue(name: string, url: string): void;
24 tms(name: string, url: string): void;
25 description(markdown: string): void;
26 descriptionHtml(html: string): void;
27 owner(owner: string): void;
28 severity(severity: string): void;
29 layer(layer: string): void;
30 id(allureId: string): void;
31 tag(tag: string): void;
32 writeEnvironmentInfo(info: Record<string, string>): void;
33 writeCategoriesDefinitions(categories: Category[]): void;
34 abstract attachment(name: string, content: Buffer | string, options: ContentType | string | AttachmentOptions): void;
35 abstract logStep(name: string, status?: Status): void;
36 abstract step<T>(name: string, body: (step: StepInterface) => T): T;
37}
38export interface StepInterface {
39 parameter(name: string, value: string): void;
40 name(name: string): void;
41}