Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Add async / await example to page object docs #4675

Merged
merged 1 commit into from
Jan 25, 2018
Merged

Add async / await example to page object docs #4675

merged 1 commit into from
Jan 25, 2018

Conversation

antgel
Copy link
Contributor

@antgel antgel commented Jan 24, 2018

Changed old getGreeting to getGreetingText so that I could use getGreeting for the non-async example of returning the object. As requested #4637.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address on your commit. Check your existing CLA data and verify that your email is set on your git commits.
  • If your company signed a CLA, they designated a Point of Contact who decides which employees are authorized to participate. You may need to contact the Point of Contact for your company and ask to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot. The email used to register you as an authorized contributor must be the email used for the Git commit.
  • In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

1 similar comment
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address on your commit. Check your existing CLA data and verify that your email is set on your git commits.
  • If your company signed a CLA, they designated a Point of Contact who decides which employees are authorized to participate. You may need to contact the Point of Contact for your company and ask to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot. The email used to register you as an authorized contributor must be the email used for the Git commit.
  • In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

@antgel
Copy link
Contributor Author

antgel commented Jan 24, 2018 via email

@googlebot
Copy link

CLAs look good, thanks!

1 similar comment
@googlebot
Copy link

CLAs look good, thanks!

@qiyigg
Copy link
Contributor

qiyigg commented Jan 24, 2018

Would you mind updating the comment according to https://github.com/angular/protractor/blob/master/CONTRIBUTING.md

Thanks a lot!

@qiyigg
Copy link
Contributor

qiyigg commented Jan 24, 2018

Also,
For now, we only have one paragraph to demonstrate how to write page object with asyns/await. But we don't have an example to show to use asyns/await page object in their test. Actually they still need await for the pageObject even though pageObject method itself have await,
e.g.
await pageObject.getGreetingText(). That might be confusing since the sections after that are only for tests using control flow (don't have await for page object, don't have disable_control_flow in their test config)

Maybe we can add more description or examples to show that?

@antgel
Copy link
Contributor Author

antgel commented Jan 25, 2018

@qiyigg I updated the comment (I had read the contributing doc, but I wrongly assumed it wasn't relevant for docs), and added another example for async / await in the test itself.

@qiyigg
Copy link
Contributor

qiyigg commented Jan 25, 2018

Merged. thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants