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

Commit

Permalink
fix(waitForAngular): when timeout overflows, at least pass the negati…
Browse files Browse the repository at this point in the history
…ve to error messages

Closes #622
  • Loading branch information
juliemr committed Mar 20, 2014
1 parent e8d9d90 commit 99bda1a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/protractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -572,13 +572,13 @@ Protractor.prototype.waitForAngular = function() {
var timeout;
if (/asynchronous script timeout/.test(err.message)) {
// Timeout on Chrome
timeout = /[\d\.]*\ seconds/.exec(err.message);
timeout = /-?[\d\.]*\ seconds/.exec(err.message);
} else if (/Timed out waiting for async script/.test(err.message)) {
// Timeout on Firefox
timeout = /[\d\.]*ms/.exec(err.message);
timeout = /-?[\d\.]*ms/.exec(err.message);
} else if (/Timed out waiting for an asynchronous script/.test(err.message)) {
// Timeout on Safari
timeout = /[\d\.]*\ ms/.exec(err.message);
timeout = /-?[\d\.]*\ ms/.exec(err.message);
}
if (timeout) {
throw 'Timed out waiting for Protractor to synchronize with ' +
Expand Down

0 comments on commit 99bda1a

Please sign in to comment.