-
Notifications
You must be signed in to change notification settings - Fork 40
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 [attr] and [attr="val"] to findNode capabilities #22
Conversation
Ooo, this is quite nice - but I'm not sure if it'll be needed once we do the API changes discussed in #9 (comment) land - what do you think? |
#9 will definitely solve this case. ETA? |
I meant to do it last weekend - so should be soon. |
I've published Along with the |
Awesome, thanks! |
Hmm, I don't necessarily want to have to specify the Component Name, just filter based on props. Context: we're using skin deep to get coverage and verify behavior but NOT tie ourselves to html structure/presentation (classes/ids). So really, this would be our ideal API: tree.findNode({'data-testref': 'good'});
tree.everySubTree({'data-testref': /.*good.*/});
tree.findComponentLike({'data-testref': 'yay green'},
{ children: ['Navigation', {'data-testref': 'fly'}] }); |
Ah, I see - could you live with |
Yeah, definitely could do that. |
Released Haven't added to other methods as they're all going away soonish. |
Goooood.... GOOOOOOOOD... Now all we gotta do is write a ton of tests! |
Added support for
tree.findNode('[data-has-tests="yay"]')
. Tests added and passing.