allure-js-commons
Version:
Allure JS Commons
42 lines (41 loc) • 1.95 kB
TypeScript
/// <reference types="node" />
import { AllureRuntime } from "./AllureRuntime.js";
import { AllureTest } from "./AllureTest.js";
import { ExecutableItemWrapper } from "./ExecutableItemWrapper.js";
import { AllureRuntimeApiInterface } from "./framework/index.js";
import { AttachmentOptions, Category, ContentType, ParameterOptions, Status } from "./model.js";
export declare abstract class Allure implements Omit<AllureRuntimeApiInterface, "step" | "attachment"> {
protected runtime: AllureRuntime;
protected abstract get currentTest(): AllureTest;
protected abstract get currentExecutable(): ExecutableItemWrapper;
protected constructor(runtime: AllureRuntime);
testCaseId(id: string): void;
historyId(id: string): void;
epic(epic: string): void;
feature(feature: string): void;
story(story: string): void;
suite(name: string): void;
parentSuite(name: string): void;
subSuite(name: string): void;
label(name: string, value: string): void;
parameter(name: string, value: any, options?: ParameterOptions): void;
link(url: string, name?: string, type?: string): void;
issue(name: string, url: string): void;
tms(name: string, url: string): void;
description(markdown: string): void;
descriptionHtml(html: string): void;
owner(owner: string): void;
severity(severity: string): void;
layer(layer: string): void;
id(allureId: string): void;
tag(tag: string): void;
writeEnvironmentInfo(info: Record<string, string>): void;
writeCategoriesDefinitions(categories: Category[]): void;
abstract attachment(name: string, content: Buffer | string, options: ContentType | string | AttachmentOptions): void;
abstract logStep(name: string, status?: Status): void;
abstract step<T>(name: string, body: (step: StepInterface) => T): T;
}
export interface StepInterface {
parameter(name: string, value: string): void;
name(name: string): void;
}