-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[New]: selectors
: support universal selector
#1945
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.
Thanks, this looks great! Can you add more test cases that combine * with other selector types?
049b165
to
9426503
Compare
@ljharb added 4 more tests like |
Does this only select DOM nodes or also components (class or function etc). |
Currently it's only for DOM nodes. Just like other string css selectors. |
9426503
to
67e0949
Compare
Could we add a test to ensure that this is not returning other components? I'm asking because I currently use a helper getter to find the outermost DOM node in a subtree with findWhere and this could potentially replace that. |
@chenesan all the selectors in enzyme select on all kinds of nodes, not just DOM nodes. |
@eps1lon you may want |
67e0949
to
eb16f50
Compare
@ljharb Sorry for misleading! I just added one test to show that universal selector also select component node. |
This comment has been minimized.
This comment has been minimized.
selectors
: support universal selectorselectors
: support universal selector
This comment has been minimized.
This comment has been minimized.
eee9542
to
11dc5ec
Compare
11dc5ec
to
7bd0bdb
Compare
Fix #1158 .
Note that rst-selector-parser has universal selector support now so we only need to change selectors code in enzyme.