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

#1616 Populate missing element items to WebdriverIO.ElementArray when using toBeElementsArrayOfSize #1665

Merged

Conversation

mathew-jithin
Copy link
Contributor

Changes

  1. Modified toBeElementsArrayOfSize in src/matchers/elements/toBeElementsArrayOfSize.ts:

    • Added originalLength to preserve the initial length of the elements array.
    • Updated the array modification logic to only occur when the assertion passes and the received value is an array.
    • Used originalLength in the error message to ensure accurate reporting.
  2. Updated unit tests in test/matchers/elements/toBeElementsArrayOfSize.test.ts:

    • Added new tests to verify the array update behavior.
    • Ensured tests cover cases where the array should and should not be modified.

Copy link

linux-foundation-easycla bot commented Sep 27, 2024

CLA Signed

  • ✅login: mathew-jithin / (56c085b)

The committers listed above are authorized under a signed CLA.

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

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

Great stuff 🙌

@christian-bromann christian-bromann merged commit ce973c5 into webdriverio:main Sep 27, 2024
6 checks passed
@wdio-bot
Copy link
Contributor

Hey mathew-jithin 👋

Thank you for your contribution to WebdriverIO! Your pull request has been marked as an "Expensable" contribution.

We've sent you an email with further instructions on how to claim your expenses from our development fund.
Please make sure to check your spam folder as well. If you have any questions, feel free to reach out to us at expense@webdriver.io or in the contributing channel on Discord.

We are looking forward to more contributions from you in the future 🙌

Have a nice day,
The WebdriverIO Team 🤖

@mathew-jithin
Copy link
Contributor Author

Thanks a lot @christian-bromann 🫡

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

Successfully merging this pull request may close these issues.

3 participants