-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update JSErrorsCollectorListener and JSErrorsExtension #3
base: master
Are you sure you want to change the base?
Conversation
&& context.getTestClass().toString().contains("com.github.automatedowl") | ||
&& context.getRequiredTestMethod().getName().equals("referenceErrorTest")) { | ||
assertThrows(WebDriverException.class, ()->{ | ||
throw new WebDriverException(JS_ERRORS_EXCEPTION_STRING); | ||
}); | ||
} else if (isAssertJSErrorsEnabled(context) && getJSErrorsFromLogEntries(logEntries).anyMatch(e -> true)) { | ||
throw new WebDriverException(JS_ERRORS_EXCEPTION_STRING); | ||
} else if (isAssertJSErrorsEnabled(context) && getJSErrorsFromLogEntries(logEntries).count()!=0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of the change from anyMatch to count? @mkulikov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logic above returns true when there is items in list, which is more confusing than simple check for count != 0
logger.severe(JS_ERRORS_EXCEPTION_STRING); | ||
iTestResult.setStatus(ITestResult.FAILURE); | ||
Assert.fail(getJSErrorsFromLogEntries(logEntries).map(LogEntry::getMessage).collect(Collectors.joining("\n"))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you made sure that this addition works well with closing the driver in afterMethod call? @mkulikov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I'm sure
Going to merge? |
No description provided.