-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Add some testSubject helpers #13305
Add some testSubject helpers #13305
Conversation
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.
couple minor things, but lgtm!
await element.click(); | ||
|
||
// in case the input element is actually a child of the testSubject, we | ||
// call clearValue() and type() on the element that is focues after |
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.
focues = focused
}); | ||
} | ||
|
||
async _mapAll(selectorAll, mapFn) { |
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.
I don't think we should use preceding underscores. If you feel strongly about them, and want to diverge from airbnb, lmk and I will open up a "vote" issue so we can add it to our style guide. I don't care too much one way or the other, I just want to be consistent.
https://github.com/airbnb/javascript#naming--leading-underscore
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.
Huh, I would have sworn that this was already part of the Styleguide. I'm pretty firmly against the reasoning at the link, and thought we had already resolved this... If you want to open the vote issue I'm fine with it, but I've been using underscored methods on classes since I started using the class syntax...
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.
#13324 - I'll wait a few before posting in the Kibana chat room if you'd like time to post a counter argument. :)
* [testSubjects] add getVisibleTextAll() helper * [testSubjects] add isSelected() and isSelectedAll() helpers * [testSubjects/setValue] support wrappers around inputs * [testSubjects] add isEnabled() helper * fix typo (cherry picked from commit 8ee85f8)
While working on some functional tests I had need for some new
testSubject
helpers, and an extension to thetestSubjects.setValue()
helper that makes it support elements that wrap inputs.