Skip to content

Commit

Permalink
Merge pull request #71 from mseele/master
Browse files Browse the repository at this point in the history
fix: make Video annotation optional, not required
  • Loading branch information
SergeyPirogov authored Jul 13, 2022
2 parents 0e301f7 + 7ccce41 commit 5f7ff89
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ public void afterTestExecution(ExtensionContext context) throws Exception {
private boolean videoDisabled(Method testMethod) {
Optional<com.automation.remarks.video.annotations.Video> video = AnnotationUtils.findAnnotation(testMethod, com.automation.remarks.video.annotations.Video.class);

return video.map(v -> !videoEnabled(v))
.orElseGet(() -> true);

//return !video.isPresent() && !videoEnabled(video.get());
return !videoEnabled(video.orElse(null));
}

private String getFileName(Method testMethod) {
Expand Down

0 comments on commit 5f7ff89

Please sign in to comment.