UNPKG

yachr

Version:

Yet another cucumber html reporter

48 lines (47 loc) 2.03 kB
import { FeatureSummary } from './models/aggregator/featureSummary'; import { ScenarioSummary } from './models/aggregator/scenarioSummary'; import { ICucumberFeatureSuite } from './models/reporter/cucumberFeatureSuite'; import { IReportOptions } from './models/reportOptions'; /** * The main YACHR Cucumber HTML Report generator. * Provides an API to read in a Cucumber Test Report, * and generate a static HTML page which summarises the report * into a dashboard */ export declare class Reporter { /** * Generates the HTML Report summary for the Cucumber Test Report. * @param options Options to configure how the reporter will generate the HTML report */ generate(options: IReportOptions): void; /** * Parses a JSON file (at the given file path) into the data model for * the Cucumber Report. This report can then be used with strong typing * when accessing components of the report * @param resultsFile The path to the Cucumber Test Results file */ parseJsonFile(resultsFile: string): ICucumberFeatureSuite; /** * Filters the features and scenario's based on tags */ filterResults(featureSuiteOrig: ICucumberFeatureSuite, options: IReportOptions): ICucumberFeatureSuite; /** * Parses a JSON String and returns a strongly typed data model * reflecting the Cucumber Test Report data structure * @param results An array of Cucumber Features from the Test Report */ parseJsonString(results: string): ICucumberFeatureSuite; /** * Used by generate to add in any default options that need to overwrite empty parameters * @param options The options as passed in by the user */ populateDefaultOptionsIfMissing(options: IReportOptions): IReportOptions; /** * Generates the cess for the feature block of html */ getFeatureCss(featureSummary: FeatureSummary): string; /** * Returns the css for the scenario block */ getScenarioCss(scenarioSummary: ScenarioSummary): string; }