Skip to content
This repository has been archived by the owner on Jul 17, 2020. It is now read-only.

Commit

Permalink
skip has higher priority than pass for BDD, pass has higher priority …
Browse files Browse the repository at this point in the history
…for non-BDD
  • Loading branch information
anshooarora committed Feb 13, 2018
1 parent 0fa897d commit f437866
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/main/java/com/aventstack/extentreports/model/Test.java
Expand Up @@ -207,14 +207,16 @@ private synchronized void updateTestStatusRecursive(Test test) {
test.getNodeContext().getAll().forEach(this::updateTestStatusRecursive); test.getNodeContext().getAll().forEach(this::updateTestStatusRecursive);
} }


// if not all children are marked SKIP, then: if (!test.isBehaviorDrivenType()) {
// ensure the parent has a status that is not SKIP // if not all children are marked SKIP, then:
if (testStatus == Status.SKIP && test.getNodeContext().getAll().stream().anyMatch(x -> x.getStatus() != Status.SKIP)) { // ensure the parent has a status that is not SKIP
// reset status if (testStatus == Status.SKIP && test.getNodeContext().getAll().stream().anyMatch(x -> x.getStatus() != Status.SKIP)) {
testStatus = Status.PASS; // reset status
// compute new status testStatus = Status.PASS;
Stream<Test> stream = test.getNodeContext().getAll().stream().filter(x -> x.getStatus() != Status.SKIP); // compute new status
stream.forEach(this::updateTestStatusRecursive); Stream<Test> stream = test.getNodeContext().getAll().stream().filter(x -> x.getStatus() != Status.SKIP);
stream.forEach(this::updateTestStatusRecursive);
}
} }
} }


Expand Down

0 comments on commit f437866

Please sign in to comment.