Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
fix(docs): only check for SEVERE logs in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tbosch committed Aug 30, 2014
1 parent 550ba01 commit 271572c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions docs/app/e2e/docsAppE2E.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict';

var webdriver = require('protractor/node_modules/selenium-webdriver');

describe('docs.angularjs.org', function () {

beforeEach(function() {
Expand All @@ -11,9 +13,12 @@ describe('docs.angularjs.org', function () {
afterEach(function() {
// verify that there were no console errors in the browser
browser.manage().logs().get('browser').then(function(browserLog) {
expect(browserLog.length).toEqual(0);
if (browserLog.length) {
console.log('browser console errors: ' + require('util').inspect(browserLog));
var filteredLog = browserLog.filter(function(logEntry) {
return logEntry.level.value > webdriver.logging.Level.WARNING.value;
});
expect(filteredLog.length).toEqual(0);
if (filteredLog.length) {
console.log('browser console errors: ' + require('util').inspect(filteredLog));
}
});
});
Expand Down

0 comments on commit 271572c

Please sign in to comment.