Permalink
Browse files

skip has higher priority than pass for BDD, pass has higher priority …

…for non-BDD
  • Loading branch information...
anshooarora committed Feb 13, 2018
1 parent 0fa897d commit f437866e6f04827b84027dcb8730df7bdadd70e9
Showing with 10 additions and 8 deletions.
  1. +10 −8 src/main/java/com/aventstack/extentreports/model/Test.java
@@ -207,14 +207,16 @@ private synchronized void updateTestStatusRecursive(Test test) {
test.getNodeContext().getAll().forEach(this::updateTestStatusRecursive);
}
// if not all children are marked SKIP, then:
// ensure the parent has a status that is not SKIP
if (testStatus == Status.SKIP && test.getNodeContext().getAll().stream().anyMatch(x -> x.getStatus() != Status.SKIP)) {
// reset status
testStatus = Status.PASS;
// compute new status
Stream<Test> stream = test.getNodeContext().getAll().stream().filter(x -> x.getStatus() != Status.SKIP);
stream.forEach(this::updateTestStatusRecursive);
if (!test.isBehaviorDrivenType()) {
// if not all children are marked SKIP, then:
// ensure the parent has a status that is not SKIP
if (testStatus == Status.SKIP && test.getNodeContext().getAll().stream().anyMatch(x -> x.getStatus() != Status.SKIP)) {
// reset status
testStatus = Status.PASS;
// compute new status
Stream<Test> stream = test.getNodeContext().getAll().stream().filter(x -> x.getStatus() != Status.SKIP);
stream.forEach(this::updateTestStatusRecursive);
}
}
}

0 comments on commit f437866

Please sign in to comment.