UNPKG

flagpole

Version:

Simple and fast DOM integration, headless or headful browser, and REST API testing framework.

71 lines (70 loc) 3.31 kB
/// <reference types="node" /> import { URL } from "url"; import { iSuite, iScenario, SuiteStatusCallback, SuiteCallback, ScenarioCallback, ScenarioMapper, BrowserOptions } from "./interfaces"; import { FlagpoleExecution } from "./flagpoleexecution"; import { SuiteTaskManager } from "./suitetaskmanager"; import { ScenarioType } from "./scenario-types"; import { FfprobeOptions } from "media-probe"; import { MediaStreamValidatorOpts } from "media-stream-validator"; export declare class Suite implements iSuite { get baseUrl(): URL | null; get failCount(): number; get waitingToExecuteCount(): number; get executingCount(): number; get hasPassed(): boolean; get hasFailed(): boolean; get hasExecuted(): boolean; get hasFinished(): boolean; get totalDuration(): number | null; get executionDuration(): number | null; get title(): string; get finished(): Promise<void>; get executionOptions(): FlagpoleExecution; get scenarios(): iScenario[]; protected _title: string; protected _baseUrl: URL | null; protected _waitToExecute: boolean; protected _verifySslCert: boolean; protected _taskManager: SuiteTaskManager; protected _aliasedData: any; constructor(title: string); subscribe(callback: SuiteStatusCallback): iSuite; verifyCert: (verify: boolean) => Suite; verifySslCert(verify: boolean): Suite; wait(bool?: boolean): Suite; setConcurrencyLimit(maxExecutions: number): iSuite; setMaxScenarioDuration(timeout: number): iSuite; print(exitAfterPrint?: boolean): void; scenario(title: string, type: "browser" | "extjs", opts?: BrowserOptions): iScenario; scenario(title: string, type: "ffprobe", opts?: FfprobeOptions): iScenario; scenario(title: string, type: "mediastreamvalidator", opts?: MediaStreamValidatorOpts): iScenario; scenario(title: string, type?: ScenarioType, opts?: any): iScenario; import(originalScenario: iScenario): iScenario; json(title: string): iScenario; image(title: string): iScenario; video(title: string): iScenario; html(title: string): iScenario; stylesheet(title: string): iScenario; script(title: string): iScenario; resource(title: string): iScenario; browser(title: string, opts?: BrowserOptions): iScenario; extjs(title: string, opts?: BrowserOptions): iScenario; base(url: string): Suite; base(basePathsByEnvironment: {}): Suite; base(callback: SuiteCallback): Suite; execute(): Suite; beforeAll(callback: SuiteCallback, prepend?: boolean): Suite; beforeEach(callback: ScenarioCallback, prepend?: boolean): Suite; afterEach(callback: ScenarioCallback, prepend?: boolean): Suite; afterAll(callback: SuiteCallback, prepend?: boolean): Suite; success(callback: SuiteCallback, prepend?: boolean): Suite; failure(callback: SuiteCallback, prepend?: boolean): Suite; finally(callback: SuiteCallback, prepend?: boolean): Suite; promise(): Promise<iSuite>; protected _getArray(key: string): any[]; mapScenarios(key: string, map: ScenarioMapper): Promise<iScenario[]>; mapScenarios(arr: any[], map: ScenarioMapper): Promise<iScenario[]>; push(key: string, value: any): iSuite; set(key: string, value: any): iSuite; get<T = any>(key: string): T; }