-
Notifications
You must be signed in to change notification settings - Fork 466
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 ability to select title
element of SVG with getByTitle
#86
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.
Excellent! Thank you 👍
text, | ||
{exact = true, collapseWhitespace = true, trim = true} = {}, | ||
) { | ||
const matcher = exact ? matches : fuzzyMatches |
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'm guessing this is where we're missing some coverage. Could you add one more assertion that specifies exact: false
to cover this?
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.
Sure thing. Will get that pushed up shortly.
Thanks so much for your help! I've added you as a collaborator on the project. Please make sure that you review the |
🎉 This PR is included in version 3.2.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Also adds @Gpx to contributors! Closes testing-library#86
Close #83
What: Add ability to select
title
element of SVG withgetByTitle
Why: The
title
element of an SVG behaves the same as atitle
attribute on other elements, so thegetByTitle
query should find that element.How: Update
queryAllByTitle
function to check for[title]
orsvg > title
selectors and use either one that is returned for the match.Checklist: