import type { TestObserver, TestInfo, TestResultInfo, RunResultInfo, TestRunInfo } from '@mobilewright/protocol'; import { type UploadTestResultParams } from './upload-client.js'; export interface MobileNextTestResultConfig { /** Upload the test report to mobilenext. 'on' always uploads, 'on-failure' uploads only when a test fails, 'off' disables uploading. Default: 'on'. */ uploadReport?: 'on' | 'off' | 'on-failure'; name?: string; tags?: string[]; environment?: string; } type UploadFn = (params: UploadTestResultParams) => Promise<{ url: string; }>; export interface MobileNextTestObserverOptions { apiKey: string; testResult: MobileNextTestResultConfig; uploadTimeout?: number; _uploadFn?: UploadFn; } /** * `TestObserver` implementation for `MobileNextDriver`: collects per-step * source snippets during the run, then on `onRunEnd` injects them into * Playwright's JSON report and uploads it to mobilenext. */ export declare class MobileNextTestObserver implements TestObserver { private hasFailed; private hasTests; private readonly options; private readonly snippetsByKey; private readonly sourceCache; constructor(options: MobileNextTestObserverOptions); onRunStart(run: TestRunInfo): void; onTestEnd(test: TestInfo, result: TestResultInfo): void; onRunEnd(result: RunResultInfo): Promise; private collectSnippets; private extractSnippet; private injectSnippets; private walkSuite; private walkSteps; } export {}; //# sourceMappingURL=observer.d.ts.map