html-reporter
Version:
Html-reporter and GUI for viewing and managing results of a tests run. Currently supports Testplane and Hermione.
47 lines (46 loc) • 2.13 kB
TypeScript
import { PlaywrightConfigAdapter } from '../../config/playwright';
import { PlaywrightTestCollectionAdapter } from '../../test-collection/playwright';
import { HtmlReporter } from '../../../plugin-api';
import { ToolName, BrowserFeature } from '../../../constants';
import { GuiApi } from '../../../gui/api';
import { ToolAdapter, ToolAdapterOptionsFromCli } from '../index';
import type { GuiReportBuilder } from '../../../report-builder/gui';
import type { EventSource } from '../../../gui/event-source';
import type { ReporterConfig } from '../../../types';
import type { TestSpec } from '../types';
import type { FullConfig } from '@playwright/test/reporter';
type PlaywrightToolAdapterOptions = ToolAdapterOptionsFromCli & {
config: FullConfig;
configPath: string;
};
export declare const DEFAULT_CONFIG_PATHS: string[];
export declare class PlaywrightToolAdapter implements ToolAdapter {
private _toolName;
private _configPath;
private _config;
private _reporterConfig;
private _hasProjectsInConfig;
private _htmlReporter;
private _pwtBinaryPath;
private _reportBuilder;
private _eventSource;
private _guiApi?;
static create(this: new (options: PlaywrightToolAdapterOptions) => PlaywrightToolAdapter, options: ToolAdapterOptionsFromCli): Promise<PlaywrightToolAdapter>;
constructor(opts: PlaywrightToolAdapterOptions);
get configPath(): string;
get toolName(): ToolName;
get config(): PlaywrightConfigAdapter;
get reporterConfig(): ReporterConfig;
get htmlReporter(): HtmlReporter;
get guiApi(): GuiApi | undefined;
get browserFeatures(): Record<string, BrowserFeature[]>;
initGuiApi(): void;
readTests(): Promise<PlaywrightTestCollectionAdapter>;
run(_testCollection: PlaywrightTestCollectionAdapter, tests?: TestSpec[]): Promise<boolean>;
runWithoutRetries(_testCollection: PlaywrightTestCollectionAdapter, tests?: TestSpec[]): Promise<boolean>;
private _runTests;
handleTestResults(reportBuilder: GuiReportBuilder, eventSource: EventSource): void;
updateReference(): void;
halt(err: Error): void;
}
export {};