import { Func, Suite, HookFunction } from 'mocha'; import { Application } from 'spectron'; export interface ISuite extends Suite { app: Application; _kuiDestroyAfter?: boolean; } /** restart the app */ export declare const restart: (ctx: ISuite) => Promise; /** reload the app */ export declare const refresh: (ctx: ISuite, wait?: boolean, clean?: boolean) => Promise; export interface BeforeOptions { noApp?: boolean; popup?: string[]; noProxySessionWait?: boolean; afterStart?: () => Promise; beforeStart?: () => Promise; } /** * This is the method that will be called before a test begins * */ export declare const before: (ctx: ISuite, options?: BeforeOptions) => HookFunction; /** * This is the method that will be called when a test completes * */ export declare const after: (ctx: ISuite, f?: () => void) => HookFunction; export declare const oops: (ctx: ISuite, wait?: boolean) => (err: Error) => Promise; /** only execute the test in local */ export declare const localIt: (msg: string, func: Func) => Mocha.Test; /** only execute the test suite in local */ export declare const localDescribe: (msg: string, suite: (this: Suite) => void) => Suite; /** only execute the test suite in an environment that has docker */ export declare const dockerDescribe: (msg: string, suite: (this: Suite) => void) => Suite; /** only execute the test in non-proxy browser */ export declare const remoteIt: (msg: string, func: Func) => Mocha.Test; /** only execute the test suite in proxy+browser clients */ export declare const proxyDescribe: (msg: string, suite: (this: Suite) => void) => Suite; /** only execute the test suite in electron or proxy+browser clients */ export declare const pDescribe: (msg: string, suite: (this: Suite) => void) => Suite; /** only execute the test in proxy+browser client */ export declare const proxyIt: (msg: string, func: Func) => Mocha.Test; /** only execute the test in electron or proxy+browser client */ export declare const pit: (msg: string, func: Func) => Mocha.Test; /** non-headless targets in travis use the clients/default version */ export declare const expectedVersion: string; export declare function setDebugMode(this: ISuite): void;