This repository was archived by the owner on Jul 29, 2024. It is now read-only.
chore(driverProviders): clean up driver provider q usage - #5034
Merged
Merged
Conversation
cnishina
commented
Nov 12, 2018
Contributor
- Remove driverProviderUseExistingWebDriver since the generation of the selenium server is already accomplished when providing a selenium address in driverProvider.ts. Also clean up docs and tests.
- Use native promises over q promises.
cnishina
force-pushed
the
driverProviderUseExisting
branch
from
November 13, 2018 00:05
12195c1 to
8b1f1db
Compare
heathkit
suggested changes
Nov 13, 2018
cnishina
force-pushed
the
driverProviderUseExisting
branch
10 times, most recently
from
November 13, 2018 22:44
caea081 to
7ff7d2d
Compare
- Remove driverProviderUseExistingWebDriver since the generation of the selenium server is already accomplished when providing a selenium address in driverProvider.ts. Also clean up docs and tests. - Use native promises over q promises. - Comment out driverProviderLocal tests. If the flag is set, the controlFlow method is undefined and fails this test. The error is as follows: this.driver.controlFlow is not a function at ProtractorBrowser.angularAppRoot
cnishina
force-pushed
the
driverProviderUseExisting
branch
5 times, most recently
from
November 14, 2018 01:25
39e02d1 to
e13478b
Compare
… and angularAppRoot - Enabled the driverProviderLocal tests - Remove auto unwrap test for a WebElement. Reference PR angular#3471
cnishina
force-pushed
the
driverProviderUseExisting
branch
from
November 14, 2018 01:35
e13478b to
052b591
Compare
Contributor
Author
heathkit
reviewed
Nov 14, 2018
| return this.bpClient.setWaitEnabled(!this.internalIgnoreSynchronization); | ||
| } | ||
| }) | ||
| .then(() => { |
Contributor
There was a problem hiding this comment.
This promise chain should eventually become async/await, but let's save that for another Pr.
Contributor
Author
There was a problem hiding this comment.
I agree, this promise chain might be better contained in a separate PR.
cnishina
force-pushed
the
driverProviderUseExisting
branch
from
November 14, 2018 22:57
7170367 to
e36ebc2
Compare
Contributor
Author
cnishina
force-pushed
the
driverProviderUseExisting
branch
from
November 14, 2018 23:57
e36ebc2 to
e52b7d9
Compare
heathkit
suggested changes
Nov 15, 2018
| if (timeout) { | ||
| let errMsg = `Timed out waiting for asynchronous Angular tasks to finish after ` + | ||
| `${timeout}. This may be because the current page is not an Angular ` + | ||
| `application. Please see the FAQ for more details: ` + |
Contributor
There was a problem hiding this comment.
Let's do ourselves a favor and extract as much as possible from this if statement into a private function.
Contributor
Author
There was a problem hiding this comment.
This is a great idea but I think this PR is getting a little out of hand and not keeping on point to what the original description was. I'll write an issue on this for an improvement.
| }, this.allScriptsTimeout, 'Plugins.waitForCondition()'); | ||
| } catch (err) { | ||
| let timeout: RegExpExecArray; | ||
| if (/asynchronous script timeout/.test(err.message)) { |
Contributor
There was a problem hiding this comment.
Might as well extract this into a private function to make it more readable.
cnishina
force-pushed
the
driverProviderUseExisting
branch
from
November 15, 2018 17:45
e52b7d9 to
d729bb7
Compare
- In lieu of Promise.resolve(...) for async await, just return the item - Clean up JSDocs for q.promise - Clean up interactive tests to close the browser window and let Protractor quit the driver session
cnishina
force-pushed
the
driverProviderUseExisting
branch
from
November 15, 2018 17:55
d729bb7 to
e0bf7c4
Compare
heathkit
approved these changes
Nov 15, 2018
Contributor
Author
|
Reference #4995 |
cnishina
added a commit
to cnishina/protractor
that referenced
this pull request
Dec 19, 2018
…ngular#5034) Driver providers and tests: - Use native promises over q promises in driver providers - Remove driverProviderUseExistingWebDriver since the generation of the selenium server is already accomplished when providing a selenium address in driverProvider.ts. Also clean up docs and tests. - Enabled the driverProviderLocal tests - Clean up JSDocs for q.promise Basic lib spec: - Remove auto unwrap test for a WebElement. Reference PR angular#3471 Browser: - Remove control flow from waitForAngularEnabled, waitForAngular, and angularAppRoot in the Browser class.
cnishina
added a commit
to cnishina/protractor
that referenced
this pull request
Mar 23, 2019
…ngular#5034) Driver providers and tests: - Use native promises over q promises in driver providers - Remove driverProviderUseExistingWebDriver since the generation of the selenium server is already accomplished when providing a selenium address in driverProvider.ts. Also clean up docs and tests. - Enabled the driverProviderLocal tests - Clean up JSDocs for q.promise Basic lib spec: - Remove auto unwrap test for a WebElement. Reference PR angular#3471 Browser: - Remove control flow from waitForAngularEnabled, waitForAngular, and angularAppRoot in the Browser class.
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.

