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

Commit 148f020

Browse files
gkohenhankduan
authored andcommitted
feat(protractor): Add support to allow Protractor to test an Angular application which has debugging info disabled
Currently Angular application which for performance reasons, have debug information turn off cannot be tested. This PR allows users to add the Angular debug logging flag to the Protractor run.
1 parent 950d3ee commit 148f020

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/protractor.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ var ExpectedConditions = require('./expectedConditions.js');
1717
/* global angular */
1818

1919
var DEFER_LABEL = 'NG_DEFER_BOOTSTRAP!';
20+
var ENABLE_DEBUG_INFO_LABEL = 'NG_ENABLE_DEBUG_INFO!';
2021
var DEFAULT_RESET_URL = 'data:text/html,<html></html>';
2122
var DEFAULT_GET_PAGE_TIMEOUT = 10000;
2223

@@ -632,7 +633,7 @@ Protractor.prototype.get = function(destination, opt_timeout) {
632633

633634
this.driver.get(this.resetUrl).then(null, deferred.reject);
634635
this.executeScript_(
635-
'window.name = "' + DEFER_LABEL + '" + window.name;' +
636+
'window.name = "' + DEFER_LABEL + ENABLE_DEBUG_INFO_LABEL + '" + window.name;' +
636637
'window.location.replace("' + destination + '");',
637638
msg('reset url'))
638639
.then(null, deferred.reject);

0 commit comments

Comments
 (0)