Skip to content

Commit

Permalink
Make javascript_console method less verbose when there are no errors
Browse files Browse the repository at this point in the history
  • Loading branch information
foursixnine committed Aug 16, 2018
1 parent 72b5040 commit 13c8bf5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions t/lib/OpenQA/SeleniumTest.pm
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,11 @@ sub javascript_console_has_no_warnings_or_errors {
push(@errors, $log_entry);
}

diag('javascript console output: ' . pp(\@errors)) if @errors;
is_deeply(\@errors, [], 'no errors or warnings on javascript console' . $test_name_suffix);
return scalar @errors eq 0;
if (@errors) {
diag('javascript console output: ' . pp(\@errors));
ok(scalar @errors eq 0, 'no errors or warnings on javascript console' . $test_name_suffix);
}
return scalar @errors eq 0; #TODO: fix this return value
}

# mocks the specified JavaScript functions (reverted when navigating to another page)
Expand Down

0 comments on commit 13c8bf5

Please sign in to comment.