import Runner from "./runner"; import { BaseTestplane } from "../base-testplane"; import { RefImageInfo, WdioBrowser, WorkerEventHandler } from "../types"; import { ConfigInput } from "../config/types"; import type { ProfilerFragment } from "../profiler/runtime/types"; export interface WorkerRunTestOpts { browserId: string; browserVersion: string; file: string; sessionId: string; sessionCaps: WdioBrowser["capabilities"]; sessionOpts: WdioBrowser["options"] & { capabilities: WdioBrowser["capabilities"]; }; state: Record; attempt: number; attemptId?: string; profileSessionId?: string; } export interface AssertViewResultsSuccess { stateName: string; refImg: RefImageInfo; } export interface WorkerRunTestTestplaneCtx { assertViewResults: Array; } export interface WorkerRunTestResult { meta: Record; testplaneCtx: WorkerRunTestTestplaneCtx; /** * @deprecated Use `testplaneCtx` instead */ hermioneCtx: WorkerRunTestTestplaneCtx; tags: string[]; profileFragment?: ProfilerFragment; } export interface Testplane { on: WorkerEventHandler; once: WorkerEventHandler; } export declare class Testplane extends BaseTestplane { protected runner: Runner; constructor(config?: string | ConfigInput); protected _setup(): Promise; init(): Promise; runTest(fullTitle: string, options: WorkerRunTestOpts): Promise; takeProfilerFragment(): ProfilerFragment | null; profilerLevel(): 0 | 1 | 2 | 3; isWorker(): boolean; }