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

Using async/await inside setter when promise manager is off #4901

Open
StanislavKharchenko opened this issue Jul 24, 2018 · 1 comment
Open

Comments

@StanislavKharchenko
Copy link

StanislavKharchenko commented Jul 24, 2018

Hi there!
As I know due to 2969 the PROMISE_MANAGER will be deprecated, and so protractor will not use it at all.

Currently, I'm using setter to fill web-elements in page-objects, like:

set Information(value) {
    this.information.sendKeys(value);
}

And use it inside test case:

it('Filling Information', () => {
    mainPage.Information = "Advanced info";
});

Which has a good laconic style, instead of usage of methods.

But if PROMISE_MANAGER = off I need to use async/await statements, which are not allowed within setter. So, I can't use such approach.

Does protractor has some workaround for this example?

Thank you.

Feature Request

  • To have laconic style in test cases to fill data in web-pages. Functionality worked with PROMISE_MANAGER=on
  • This is a not breaking change.
@kylecordes
Copy link

I'm now using Protractor solely in the new async await style. My suggestion for the above is to not do the thing with the set. It seems quite un-idiomatic to me, that calling set causes a side effect on a remote system. I suggest naming the method in a way that suggests what it is doing.

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

No branches or pull requests

2 participants