This repository was archived by the owner on Jul 29, 2024. It is now read-only.
feat(ngUpgrade): Auto detect ngUpgrade apps and make the ng12Hybrid f…#3847
Merged
sjelin merged 1 commit intoangular:masterfrom Dec 21, 2016
Merged
feat(ngUpgrade): Auto detect ngUpgrade apps and make the ng12Hybrid f…#3847sjelin merged 1 commit intoangular:masterfrom
sjelin merged 1 commit intoangular:masterfrom
Conversation
juliemr
reviewed
Dec 20, 2016
lib/clientsidescripts.js
Outdated
| } | ||
| if (angular.getTestability) { | ||
| angular.getTestability(el).whenStable(callback); | ||
| } else if (window.angular.version == 2) { |
Member
There was a problem hiding this comment.
Since Angular versions are going to keep advancing now, we should change this to:
else if (window.angular.version.major >= 2) {
throw new Error('You appear to be using angular, but window.getAngularTestability was ' +
'never set. This may be due to bad obfuscation.')
juliemr
reviewed
Dec 20, 2016
lib/clientsidescripts.js
Outdated
| } else if (n < 1) { | ||
| if (window.angular) { | ||
| // Figure out which version of angular we're waiting on | ||
| if(!definitelyNg1 && !definitelyNg2) { |
juliemr
reviewed
Dec 20, 2016
lib/clientsidescripts.js
Outdated
| }, 0); | ||
| }; | ||
| var definitelyNg1 = !!ng12Hybrid; | ||
| var definitelyNg2 = false; |
Member
There was a problem hiding this comment.
We should probably rename this as well, given that angular version thing. What about just definitelyNg
lib/clientsidescripts.js
Outdated
| callback({ver: 1}); | ||
| } else if (n < 1) { | ||
| if (window.angular) { | ||
| // Figure out which version of angular we're waiting on |
Member
There was a problem hiding this comment.
These comments should be /** */ style because some versions of webdriver will glomp lines together and // comments break stuff.
| } | ||
| } else if (definitelyNg2) { | ||
| if (true /** ng2 has no resumeBootstrap() **/) { | ||
| return callback({ver: 2}); |
Member
There was a problem hiding this comment.
Leaving this as ver: 2 is fine for now but we should make this more future-proof later.
…lag unnecessary for most users
Contributor
Author
|
@juliemr All comments addressed! |
juliemr
approved these changes
Dec 21, 2016
Member
|
LGTM |
sjelin
added a commit
to sjelin/protractor
that referenced
this pull request
Dec 21, 2016
…lag unnecessary for most users (angular#3847)
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…lag unnecessary for most users
Closes #3836