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

fix(bootstrap): fix bootstrap for older versions of angular #3144

Merged
merged 2 commits into from
Apr 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions lib/protractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ var ExpectedConditions = require('./expectedConditions').ExpectedConditions;
/* global angular */

var DEFER_LABEL = 'NG_DEFER_BOOTSTRAP!';
var ENABLE_DEBUG_INFO_LABEL = 'NG_ENABLE_DEBUG_INFO!';
var DEFAULT_RESET_URL = 'data:text/html,<html></html>';
var DEFAULT_GET_PAGE_TIMEOUT = 10000;

Expand Down Expand Up @@ -403,8 +402,8 @@ Protractor.prototype.waitForAngular = function(opt_description) {
var errMsg = 'Timed out waiting for Protractor to synchronize with ' +
'the page after ' + timeout + '. Please see ' +
'https://github.com/angular/protractor/blob/master/docs/faq.md';
if(description.startsWith(' - Locator: ')){
errMsg += '\n' + description;
if (description.startsWith(' - Locator: ')) {
errMsg += '\nWhile waiting for element with locator' + description;
}
var pendingTimeoutsPromise;
if (self.trackOutstandingTimeouts_) {
Expand Down Expand Up @@ -640,7 +639,7 @@ Protractor.prototype.get = function(destination, opt_timeout) {

this.driver.get(this.resetUrl).then(null, deferred.reject);
this.executeScript_(
'window.name = "' + ENABLE_DEBUG_INFO_LABEL + DEFER_LABEL + '" + window.name;' +
'window.name = "' + DEFER_LABEL + '" + window.name;' +

'window.location.replace("' + destination + '");',
msg('reset url'))
Expand Down
2 changes: 1 addition & 1 deletion scripts/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ executor.addCommandlineTest('node built/cli.js spec/errorTest/slowHttpAndTimeout
.expectExitCode(1)
.expectErrors([
{message: 'The following tasks were pending[\\s\\S]*\\$http: slowcall'},
{message: '^((?!The following tasks were pending).)*$'}
{message: 'While waiting for element with locator - Locator: by.binding\\(\\"slowAngularTimeoutStatus\\"\\)$'}
]);

executor.execute();