Skip to content

Conversation

@mkulikov
Copy link

No description provided.

});
} else if (isAssertJSErrorsEnabled(context) && getJSErrorsFromLogEntries(logEntries).anyMatch(e -> true)) {
throw new WebDriverException(JS_ERRORS_EXCEPTION_STRING);
} else if (isAssertJSErrorsEnabled(context) && getJSErrorsFromLogEntries(logEntries).count()!=0) {
Copy link
Owner

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

Copy link
Author

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

iInvokedMethod) && getJSErrorsFromLogEntries(logEntries).count()!=0) {
logger.severe(JS_ERRORS_EXCEPTION_STRING);
iTestResult.setStatus(ITestResult.FAILURE);
Assert.fail(getJSErrorsFromLogEntries(logEntries).map(LogEntry::getMessage).collect(Collectors.joining("\n")));
Copy link
Owner

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I'm sure

@mgladchenko
Copy link

Going to merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants