testeranto
Version:
the AI powered BDD test framework for typescript projects
41 lines (40 loc) • 1.88 kB
TypeScript
import { Browser } from "puppeteer-core";
import { IBuiltConfig, ITLog } from "../index";
import { PM_Base } from "../../PM/base";
export declare class MockPMBase implements PM_Base {
browser: Browser;
configs: IBuiltConfig;
calls: Record<string, any[]>;
testResourceConfiguration: any;
constructor(configs?: IBuiltConfig);
protected trackCall(method: string, args: any): void;
getCallCount(method: string): number;
getLastCall(method: string): any;
launchSideCar(n: number, testName: string, projectName: string): Promise<void>;
end(uid: number): Promise<boolean>;
debug(message: string): void;
writeFileSync(path: string, content: string, testName?: string): Promise<boolean>;
createWriteStream(path: string, testName?: string): Promise<number>;
screencast(opts: any, testName: string, page?: any): Promise<any>;
customScreenShot(opts: any, testName: string, pageUid?: any): Promise<any>;
testArtiFactoryfileWriter(tLog: ITLog, callback: (promise: Promise<any>) => void): any;
closePage(p: any): any;
$(selector: string, p: string): Promise<any>;
click(selector: string, page: any): any;
goto(p: string, url: string): any;
newPage(): Promise<string>;
pages(): Promise<string[]>;
waitForSelector(p: string, s: string): any;
focusOn(selector: string, p: string): any;
typeInto(value: string, p: string): any;
getAttribute(selector: string, attribute: string, p: string): any;
getInnerHtml(selector: string, p: string): Promise<any>;
isDisabled(selector: string, p: string): any;
screencastStop(s: string): any;
existsSync(destFolder: string): boolean;
mkdirSync(fp: string): any;
write(uid: number, contents: string): Promise<boolean>;
page(p: any): string | undefined;
doInPage(p: string, cb: (p: any) => unknown): any;
customclose(): any;
}