Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 18 additions & 10 deletions lib/generate-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,14 @@ function generateReport(options) {
}

if (scenario.skipped > 0) {
suite.scenarios.total++;
suite.scenarios.skipped++;
feature.scenarios.total++;
return feature.scenarios.skipped++;
suite.scenarios.total++
feature.scenarios.total++
if (scenario.pending > 0) {
suite.scenarios.pending++
return feature.scenarios.pending++
}
suite.scenarios.skipped++
return feature.scenarios.skipped++
}

/* istanbul ignore else */
Expand All @@ -392,7 +396,8 @@ function generateReport(options) {
}
});

feature.isSkipped = feature.scenarios.total === feature.scenarios.skipped;
feature.isPending = feature.scenarios.total === feature.scenarios.pending
feature.isSkipped = (feature.scenarios.total === (feature.scenarios.skipped + feature.scenarios.pending))

return feature;
}
Expand Down Expand Up @@ -480,6 +485,13 @@ function generateReport(options) {
'<br />'
);
}
if (step.result.status === RESULT_STATUS.pending) {
return scenario.pending++
}

if (step.result.status === RESULT_STATUS.skipped) {
return scenario.skipped++
}

if (
!step.result ||
Expand Down Expand Up @@ -512,15 +524,11 @@ function generateReport(options) {
return scenario.notDefined++;
}

if (step.result.status.toLowerCase() === RESULT_STATUS.pending) {
return scenario.pending++;
}

if (step.result.status.toLowerCase() === RESULT_STATUS.ambiguous) {
return scenario.ambiguous++;
}

scenario.skipped++;
scenario.pending++
});

return scenario;
Expand Down