@uuv/playwright
Version:
A solution to facilitate the writing and execution of E2E tests understandable by any human being using cucumber(BDD) and playwright
77 lines (76 loc) • 2.98 kB
TypeScript
import { FullConfig, FullResult, Suite, TestCase, TestStep, TestResult } from "@playwright/test/reporter";
import { Envelope } from "@cucumber/messages";
export declare enum GeneratedReportType {
CONSOLE = "console",
HTML = "html"
}
declare class UuvPlaywrightReporterHelper {
testDir: string;
private queries;
envelopes: Envelope[];
private featureFileAndTestCaseStatusMap;
private testCasesAndTestCasesStartedIdMap;
private testCasesAndPickleIdMap;
private testCasesTestStepStartedIdMap;
private testStepLocationAndTestStepIdMap;
private consoleReportMap;
private errors;
private currentFeatureFile;
private foundConf;
constructor();
createTestRunStartedEnvelope(config: FullConfig, suite: Suite, startTimestamp: {
seconds: number;
nanos: number;
}): void;
createTestCaseStartedEnvelope(test: TestCase, result: TestResult, featureFile: string, startTimestamp: {
seconds: number;
nanos: number;
}): void;
createTestStepStartedEnvelope(test: TestCase, step: TestStep, featureFile: string, startTimestamp: {
seconds: number;
nanos: number;
}): void;
private createTestStepSkippedEnvelope;
createTestStepFinishedEnvelope(test: TestCase, step: TestStep, result: TestResult, featureFile: string, startTimestamp: {
seconds: number;
nanos: number;
}): void;
private getTestStepKey;
createTestCaseFinishedEnvelope(test: TestCase, result: TestResult, featureFile: string, endTimestamp: any): void;
private handleTestEnd;
private handleTestSuiteFinishedIfNeeded;
private addResultErrors;
private createTestCaseErrorAttachmentsEnvelope;
private initConsoleReportIfNotExists;
private updateConsoleReport;
createTestRunFinishedEnvelope(result: FullResult): void;
generateReport(reportType: GeneratedReportType): Promise<void>;
getTimestamp(inpuDate?: Date): {
seconds: number;
nanos: number;
};
getOriginalFeatureFile(generatedFile: string): string | undefined;
getTestSuiteName(featureFile: string): string;
getCurrentRunningScenario(test: TestCase, featureFile: string): string;
private addError;
private getStatus;
private createEnvelope;
private createCucumberNdJsonFile;
private initializeCucumberReportNdJson;
private populateTestCasesAndPickleIdMap;
private updateTestcaseStatus;
private generateTestStep;
private createStepDefinitionEnvelope;
private getFeatureFiles;
private formatCucumberMessageFile;
private generateHtmlReportFromJson;
private generateHtmlReport;
private createdDirIfNeeded;
private displayConsoleReport;
logTestBegin(testCase: TestCase, featureFile: string): void;
logTestEnd(testCase: TestCase, result: TestResult): void;
private getResultIcon;
private getTestCaseTitle;
private getTagsParameter;
}
export default UuvPlaywrightReporterHelper;