flagpole
Version:
Simple and fast DOM integration, headless or headful browser, and REST API testing framework.
91 lines (90 loc) • 3.54 kB
TypeScript
/// <reference types="node" />
import { ResponseType, SuiteStatusEvent } from "./enums";
import { URL } from "url";
import { iSuite, iScenario } from "./interfaces";
import { FlagpoleExecutionOptions } from ".";
import { BrowserOptions } from "./httprequest";
export declare class Suite implements iSuite {
scenarios: Array<iScenario>;
get suite(): Suite;
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(): FlagpoleExecutionOptions;
protected _subscribers: Function[];
protected _errorCallbacks: Function[];
protected _successCallbacks: Function[];
protected _failureCallbacks: Function[];
protected _finallyCallbacks: Function[];
protected _beforeAllCallbacks: Function[];
protected _afterAllCallbacks: Function[];
protected _beforeEachCallbacks: Function[];
protected _afterEachCallbacks: Function[];
protected _beforeAllPromise: Promise<void>;
protected _beforeAllResolver: Function;
protected _finishedPromise: Promise<void>;
protected _finishedResolver: Function;
protected _title: string;
protected _baseUrl: URL | null;
protected _timeSuiteInitialized: number;
protected _timeSuiteExecuted: number | null;
protected _timeSuiteFinished: number | null;
protected _waitToExecute: boolean;
protected _verifySslCert: boolean;
protected _concurrencyLimit: number;
constructor(title: string);
subscribe(callback: Function): iSuite;
verifySslCert(verify: boolean): Suite;
wait(bool?: boolean): Suite;
setConcurrencyLimit(maxExecutions: number): void;
print(exitAfterPrint?: boolean): void;
scenario(title: string, type: ResponseType, opts?: BrowserOptions): 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: Function): Suite;
buildUrl(path: string): string;
execute(): Suite;
beforeAll(callback: Function): Suite;
beforeEach(callback: Function): Suite;
afterEach(callback: Function): Suite;
afterAll(callback: Function): Suite;
error: (callback: Function) => Suite;
catch(callback: Function): Suite;
success(callback: Function): Suite;
failure(callback: Function): Suite;
finally(callback: Function): Suite;
promise(): Promise<Suite>;
private _haveAllScenariosFinished;
private _fireBeforeAll;
private _fireBeforeEach;
private _fireAfterEach;
private _fireAfterAll;
private _fireSuccess;
private _fireFailure;
private _fireError;
private _fireFinally;
private _onBeforeScenarioExecutes;
private _onAfterScenarioExecutes;
private _onAfterScenarioFinished;
protected _beforeAllResolved(): Promise<any>;
protected _publish(statusEvent: SuiteStatusEvent): void;
protected _executeNext(): void;
}