-
Notifications
You must be signed in to change notification settings - Fork 841
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
Support multiple space-separated values within a single element's data-test-subj attribute #1587
Support multiple space-separated values within a single element's data-test-subj attribute #1587
Conversation
…a-test-subj attribute.
5dd157d
to
42b6bfe
Compare
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.
👍 Makes sense to me
Instead of always-on, how about passing a matcher to the function?
This way we can support all of the attribute selectors https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors#Syntax |
@chandlerprall I think that's a great idea! How do you feel about |
@cjcenizal that sounds good to me |
@chandlerprall @thompsongl Updated with your feedback and added tests. Could you take another look please? |
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.
Thanks! A couple minor things
CHANGELOG.md
Outdated
**Bug fixes** | ||
|
||
- Fixed several bugs with `EuiRange` and `EuiDualRange` including sizing of inputs, tick placement, and the handling of invalid values ([#1580](https://github.com/elastic/eui/pull/1580)) | ||
>>>>>>> edf0b85abf0668db2fc7f3c282a077fcc2d6f121 |
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.
Merge remnants
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.
Whoops!
src/test/find_test_subject.js
Outdated
@@ -2,11 +2,12 @@ | |||
* Find node which matches a specific test subject selector. Returns ReactWrappers around DOM element, | |||
* https://github.com/airbnb/enzyme/tree/master/docs/api/ReactWrapper. | |||
* Common use cases include calling simulate or getDOMNode on the returned ReactWrapper. | |||
* | |||
* The ~= matcher looks for the value in space-separated list, allowing support for multiple data-test-subj | |||
* values on a single element. |
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.
Could we add a link to the attribute selector spec or similar to give a complete view of what matcher
options are available?
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.
Great idea!
Thanks, peeps. Ready for another look. |
I've tested this in the context of Kibana, and this change doesn't seem to break any tests.