/** * Playwright reporter that generates different Cucumber reports. * * If there are multiple Cucumber reporters, they all generate the same Playwright messages, * targeting messagesBuilder. The messagesBuilder performs heavy operations (like reading feature files), * so we should build Cucumber messages only once. To achieve that, we keep track * of the reporters count in teh reporters-registry and send Playwright events only from the first reporter. * In onEnd, all reporters wait for messages to get built and emit them to the Cucumber reporter implementation. */ import { FullConfig, FullResult, Reporter as PlaywrightReporter, TestCase, TestError, TestResult } from '@playwright/test/reporter'; import MessageReporter from './message'; import HtmlReporter from './html'; import JunitReporter from './junit'; import JunitReporterModern from './junit-modern'; import JsonReporter from './json'; import { CustomReporterOptions } from './custom'; declare const builtinReporters: { readonly html: typeof HtmlReporter; readonly message: typeof MessageReporter; readonly junit: typeof JunitReporter; readonly 'junit-modern': typeof JunitReporterModern; readonly json: typeof JsonReporter; }; export type BuiltinReporters = typeof builtinReporters; export type CucumberReporterOptions = T extends keyof BuiltinReporters ? ConstructorParameters[1] : CustomReporterOptions; export default class CucumberReporterAdapter implements PlaywrightReporter { private type; private userOptions; private reporter; private isFirstReporter; constructor(fullOptions: { $type: T; } & CucumberReporterOptions); onBegin(config: FullConfig): void; printsToStdio(): boolean; onTestEnd(test: TestCase, result: TestResult): void; /** * Error not related to any test, e.g. worker teardown. */ onError(error: TestError): void; onEnd(result: FullResult): Promise; private createCucumberReporter; } export {}; //# sourceMappingURL=index.d.ts.map