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

(webdriverio): support async iterators for WebdriverIO.ElementArray #11874

Merged
merged 8 commits into from
Dec 15, 2023

Conversation

christian-bromann
Copy link
Member

@christian-bromann christian-bromann commented Dec 15, 2023

Proposed changes

fixes #11872

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • I have added proper type definitions for new commands (if appropriate)

Further comments

This will break current behavior where someone would do this:

const elems = await $$('selector')
elems.map((el) => el.selector) // type "string[]"

is now:

const elems = await $$('selector')
elems.map((el) => el.selector) // type "Promise<string[]>"

as all async iterators will return a promise. However I doubt anyone would iterate over an WebdriverIO.Element[] to filter or map through its static properties.

Reviewers: @webdriverio/project-committers

@christian-bromann christian-bromann added the PR: Bug Fix 🐛 PRs that contain bug fixes label Dec 15, 2023
Copy link
Member

@erwinheitzman erwinheitzman left a comment

Choose a reason for hiding this comment

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

Awesome work, love it 😃

@christian-bromann christian-bromann merged commit 0cba687 into main Dec 15, 2023
8 checks passed
@christian-bromann christian-bromann deleted the cb/async-iterators branch December 15, 2023 19:49
AlexGalichenko pushed a commit to qavajs/steps-wdio that referenced this pull request Dec 21, 2023
AlexGalichenko added a commit to qavajs/steps-wdio that referenced this pull request Dec 21, 2023
…#124)

* added _I type {string} chars to {string}_ to send find-grained events
* updated collection steps according to change webdriverio/webdriverio#11874
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Bug Fix 🐛 PRs that contain bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: don't require chaining for async iterators
2 participants