import { TestStatus } from '../constants'; import type { SqliteClient } from '../sqlite-client'; import { ReporterTestResult } from '../adapters/test-result'; import { ReporterConfig } from '../types'; import { HtmlReporter } from '../plugin-api'; import { TestAttemptManager } from '../test-attempt-manager'; import { RegisterWorkers } from '../workers/create-workers'; import { ImagesInfoSaver } from '../images-info-saver'; export interface StaticReportBuilderOptions { htmlReporter: HtmlReporter; reporterConfig: ReporterConfig; dbClient: SqliteClient; imagesInfoSaver: ImagesInfoSaver; } export declare class StaticReportBuilder { protected _htmlReporter: HtmlReporter; protected _reporterConfig: ReporterConfig; protected _dbClient: SqliteClient; protected _imagesInfoSaver: ImagesInfoSaver; protected _testAttemptManager: TestAttemptManager; private _workers?; static create(this: new (options: StaticReportBuilderOptions) => T, options: StaticReportBuilderOptions): T; constructor({ htmlReporter, reporterConfig, dbClient, imagesInfoSaver }: StaticReportBuilderOptions); saveStaticFiles(): Promise; registerWorkers(workers: RegisterWorkers<['saveDiffTo']>): void; registerAttempt(testInfo: { fullName: string; browserId: string; }, status: TestStatus): number; getLatestAttempt(testInfo: { fullName: string; browserId: string; }): number; /** If passed test result doesn't have attempt, this method registers new attempt and sets attempt number */ provideAttempt(testResultOriginal: ReporterTestResult): ReporterTestResult; private _saveTestResultData; addTestResult(formattedResultOriginal: ReporterTestResult): Promise; protected _deleteTestResultFromDb(...args: Parameters): void; finalize(): Promise; }