Skip to content

Commit

Permalink
Execution summary report fixes #1680 (#1687)
Browse files Browse the repository at this point in the history
-Fix Validations section in Execution summary report
  • Loading branch information
MohamedHazem95 authored Aug 12, 2024
1 parent fd84020 commit aded005
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,15 +263,18 @@ private void reportValidationState(boolean validationState, Object expected, Obj
if (!validationState) {
String failureMessage = this.validationCategoryString.replace("erify", "erificat") + "ion failed; expected " + expected + ", but found " + actual;
if (this.validationCategory.equals(ValidationEnums.ValidationCategory.HARD_ASSERT)) {
ReportManagerHelper.logNestedSteps(failureMessage, null ,null);
Allure.getLifecycle().updateStep(stepResult -> FailureReporter.fail(failureMessage));
} else {
// soft assert
ValidationsHelper.verificationFailuresList.add(failureMessage);
ValidationsHelper.verificationError = new AssertionError(String.join("\nAND ", ValidationsHelper.verificationFailuresList));
Allure.getLifecycle().updateStep(stepResult -> ReportManager.log(failureMessage));
ReportManagerHelper.logNestedSteps(failureMessage, null ,null);
}
} else {
Allure.getLifecycle().updateStep(stepResult -> ReportManager.log(this.validationCategoryString.replace("erify", "erificat") + "ion passed"));
ReportManagerHelper.logNestedSteps(validationCategoryString.replace("erify", "erificat") + "ion passed" , null ,null);
}
}
}

0 comments on commit aded005

Please sign in to comment.