-
-
Notifications
You must be signed in to change notification settings - Fork 59
fix: Fix matchers not working with $$ aka ElementArray
#1990
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
base: main
Are you sure you want to change the base?
Conversation
ace6980 to
2937e47
Compare
Even if the typing was passing using `'getElement' in received` was not considering Chainable cases
811216d to
62a200b
Compare
Speed-up unit tests runs Speed-up test execution
Align code to use same code pattern and fix case of `Element[]` not working
| - name: Run All Checks | ||
| run: npm run checks:all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting on merge of #1991
| return aliasFn.call(this, toExist, { verb: 'be', expectation: 'existing' }, el, options) | ||
| this.verb = 'be' | ||
| this.expectation = 'existing' | ||
| this.matcherName = 'toBeExisting' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed bad matcher name
| const attr = await el.getAttribute(attribute) | ||
| if (typeof attr !== 'string') { | ||
| return { result: false, value: attr } | ||
| async function conditionAttributeValueMatchWithExpected(el: WebdriverIO.Element, attribute: string, expectedValue: string | RegExp | WdioAsymmetricMatcher<string>, options: ExpectWebdriverIO.StringOptions) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verify if Array<expectedValue: string | RegExp | WdioAsymmetricMatcher<string>> is need to allow to pass multiple different expected for the $$ support
Fixes #1507.
Matchers
toBeDisplayedand several others have TypeScript signatures that support an array element, even though they don't.