Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Disable deprecated Flow Control & use async / await #35

Merged
merged 2 commits into from
Jun 6, 2019

Conversation

Robdel12
Copy link
Contributor

@Robdel12 Robdel12 commented Jun 5, 2019

What is this?

Turns out Protractor uses this thing called "Webdriver Flow Control" to handle test command execution. It relies on promises to know when to go to the next step in the tests.

Flow Control is deprecated (see: SeleniumHQ/selenium#2969) and will be removed. This is because packages / tests that use async / await don't quite work with Flow Control due to the difference in promise interfaces (I'm assuming native promises vs polyfills).

Protractor recommends using async / await now (https://www.protractortest.org/#/control-flow):

In the future, the control flow is being removed (see SeleniumHQ's github issue for details). To disable the control flow in your tests, you can use the SELENIUM_PROMISE_MANAGER: false config option.

Instead of the control flow, you can synchronize your commands with promise chaining or the upcoming ES7 feature async/await. See /spec/ts/ for examples of tests with the control flow disabled.

Because async/await uses native promises, it will make the Control Flow unreliable

This PR also removes the windows test commands since they're not needed anymore. 👍

This also removes the windows test commands since they're not needed anymore.
@Robdel12 Robdel12 requested a review from djones June 5, 2019 22:26
Copy link
Contributor

@djones djones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍍 LGTM

@Robdel12 Robdel12 merged commit b9a12c3 into master Jun 6, 2019
@Robdel12 Robdel12 deleted the rd/fix-flow-control branch June 6, 2019 17:02
@Robdel12 Robdel12 restored the rd/fix-flow-control branch August 1, 2019 14:51
@Robdel12 Robdel12 deleted the rd/fix-flow-control branch December 4, 2019 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants