UNPKG

yachr

Version:

Yet another cucumber html reporter

41 lines 2.13 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ScenarioSuiteSummary = void 0; /** * A high level summary of used for dashboard reporting. * Represents a summary of all scenarios from multiple features * in the test suite */ class ScenarioSuiteSummary { constructor() { this.passingScenarios = []; this.failingScenarios = []; this.ambiguousScenarios = []; this.pendingScenarios = []; this.undefinedScenarios = []; } /** The total number of Scenarios that are ambiguously defined from all Features */ get ambiguous() { return this.ambiguousScenarios.length; } /** The total number of scenarios that have failed from all Features */ get failed() { return this.failingScenarios.length; } /** The total number of scenarios that are not implemented from all Features (and thus marked as undefined) */ get undefined() { return this.undefinedScenarios.length; } /** The total number of Scenarios that are not implemented (and thus marked as pending) */ get pending() { return this.pendingScenarios.length; } /** The total number of scenarios that have passed from all Features */ get passed() { return this.passingScenarios.length; } /** All scenarios in this the entire Cucumber Test Suite */ get total() { return this.ambiguous + this.failed + this.undefined + this.pending + this.passed; } /** Updates the Scenario Suite Summary using information gathered in the Feature Summary */ aggregateFeature(feature) { this.passingScenarios = this.passingScenarios.concat(feature.passingScenarios); this.failingScenarios = this.failingScenarios.concat(feature.failingScenarios); this.ambiguousScenarios = this.ambiguousScenarios.concat(feature.ambiguousScenarios); this.pendingScenarios = this.pendingScenarios.concat(feature.pendingScenarios); this.undefinedScenarios = this.undefinedScenarios.concat(feature.undefinedScenarios); } } exports.ScenarioSuiteSummary = ScenarioSuiteSummary; //# sourceMappingURL=scenarioSuiteSummary.js.map