This repository has been archived by the owner on Jul 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(globals): Resolve exported globals dynamically. (#3716)
fixes #3677 Because globals are set in the runner, they may be undefined at import time. Also, the browser global object will change if browser.reset() is called. By making these globals exported as properties, they will be resolved dynamically. This also fixes issues importing protractor in config files written in typescript, since the globals are resolved at call time instead of at import time. Note that until the Runner calls setupGlobals_, these exports will be undefined. That's just the nature of these objects, though, and the global objects have the same behavior.
- Loading branch information
Showing
4 changed files
with
44 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
describe('browser.restart', function() { | ||
it('doesn\'t break ignoreSynchronization', function() { | ||
browser.get('index.html#/polling'); | ||
browser.restart(); | ||
|
||
browser.ignoreSynchronization = true; | ||
// Get a non-angular page. It shouldn't fail if ignoreSynchronization is on. | ||
browser.get('https://google.com/'); | ||
}); | ||
|
||
afterAll(() => { | ||
browser.ignoreSynchronization = false; | ||
}); | ||
}); |