import { ResponseType, ScenarioStatusEvent } from "./enums"; import { iLogItem, iResponse, iScenario, iSuite, BrowserOptions, iNextCallback } from "./interfaces"; import { BrowserControl } from "./browsercontrol"; import { AssertionResult } from "./logging/assertionresult"; import { HttpResponse } from "./httpresponse"; import { LogCollection } from "./logging/logcollection"; import * as r from "request"; import { iValue } from "."; export declare class Scenario implements iScenario { readonly suite: iSuite; get responseType(): ResponseType; get title(): string; set title(newTitle: string); get totalDuration(): number; get executionDuration(): number | null; get requestDuration(): number | null; get hasFailed(): boolean; get hasPassed(): boolean; get canExecute(): boolean; get hasExecuted(): boolean; get hasFinished(): boolean; get url(): string | null; get requestUrl(): string; get finalUrl(): string | null; get redirectCount(): number; get redirectChain(): string[]; get requestOptions(): any; protected _title: string; protected _log: LogCollection; protected _subscribers: Function[]; protected _nextCallbacks: Function[]; protected _nextMessages: Array; protected _beforeCallbacks: Function[]; protected _beforeMessages: Array; protected _afterCallbacks: Function[]; protected _afterMessages: Array; protected _finallyCallbacks: Function[]; protected _finallyMessages: Array; protected _errorCallbacks: Function[]; protected _errorMessages: Array; protected _failureCallbacks: Function[]; protected _failureMessages: Array; protected _successCallbacks: Function[]; protected _successMessages: Array; protected _onCompletedCallback: Function; protected _timeScenarioInitialized: number; protected _timeScenarioExecuted: number | null; protected _timeRequestStarted: number | null; protected _timeRequestLoaded: number | null; protected _timeScenarioFinished: number | null; protected _responseType: ResponseType; protected _redirectChain: string[]; protected _finalUrl: string | null; protected _url: string | null; protected _waitToExecute: boolean; protected _waitTime: number; protected _flipAssertion: boolean; protected _ignoreAssertion: boolean; protected _cookieJar: r.CookieJar; protected _options: any; protected _followRedirect: boolean | Function | null; protected _browserControl: BrowserControl | null; protected _isMock: boolean; protected _response: iResponse; protected _defaultBrowserOptions: BrowserOptions; protected _defaultRequestOptions: any; protected _aliasedData: any; static create(suite: iSuite, title: string, type: ResponseType, opts: any, onCompletedCallback: Function): iScenario; protected constructor(suite: iSuite, title: string, onCompletedCallback: Function); set(aliasName: string, value: any): iScenario; get(aliasName: string): any; getLog(): Promise; subscribe(callback: Function): iScenario; setJsonBody(jsonObject: any): iScenario; setRawBody(str: string): iScenario; verifySslCert(verify: boolean): iScenario; setProxyUrl(proxyUrl: string): iScenario; setTimeout(timeout: number): iScenario; setFormData(form: {}): iScenario; setMaxRedirects(n: number): iScenario; shouldFollowRedirects(onRedirect: boolean | Function): iScenario; setBasicAuth(authorization: { username: string; password: string; }): iScenario; setBearerToken(token: string): iScenario; setCookie(key: string, value: string, opts?: any): iScenario; setHeaders(headers: {}): iScenario; setHeader(key: string, value: any): iScenario; setMethod(method: string): iScenario; wait(bool?: boolean): iScenario; waitFor(thatScenario: iScenario): iScenario; comment(value: iValue): iScenario; comment(message: string): iScenario; result(result: AssertionResult): iScenario; ignore(assertions?: boolean | Function): iScenario; pause(milliseconds: number): iScenario; open(url: string): iScenario; next(message: string, callback: iNextCallback): iScenario; next(callback: iNextCallback): iScenario; nextPrepend(message: string, callback: iNextCallback): iScenario; nextPrepend(callback: iNextCallback): iScenario; skip(message?: string): Promise; cancel(): Promise; getBrowserControl(): BrowserControl; execute(): Promise; execute(params: { [key: string]: string | number; }): Promise; error(callback: Function): iScenario; error(message: string, callback: Function): iScenario; success(callback: Function): iScenario; success(message: string, callback: Function): iScenario; failure(callback: Function): iScenario; failure(message: string, callback: Function): iScenario; before(callback: Function): iScenario; before(message: string, callback: Function): iScenario; after(callback: Function): iScenario; after(message: string, callback: Function): iScenario; finally(callback: Function): iScenario; finally(message: string, callback: Function): iScenario; mock(localPath: string): iScenario; protected _reset(): iScenario; protected _getCookies(): r.Cookie[]; protected _processResponse(httpResponse: HttpResponse): void; protected _buildUrl(): string; setResponseType(type: ResponseType, opts?: any): iScenario; promise(): Promise; private _executeImageRequest; private _executeBrowserRequest; private _executeDefaultRequest; protected _executeRequest(): void; protected _executeMock(): void; protected _executeWhenReady(): boolean; protected _markScenarioCompleted(errorMessage?: string | null, errorDetails?: string): Promise; protected _fireBefore(): Promise; protected _fireAfter(): Promise; protected _fireSuccess(): Promise; protected _fireFailure(): Promise; protected _fireError(error: string): Promise; protected _fireFinally(): Promise; protected _getOverloads(a: Function | string, b?: Function | null): { message: string | null; callback: Function; }; protected _getCallbackOverload(a: Function | string, b?: Function | null): Function; protected _getMessageOverload(a: any): string | null; protected _next(a: Function | string, b?: Function | null, append?: boolean): iScenario; protected _publish(statusEvent: ScenarioStatusEvent): Promise; protected _pushToLog(logItem: iLogItem): iScenario; }