-
Notifications
You must be signed in to change notification settings - Fork 116
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
Allow setting test_selector
on select list options
#2495
Conversation
🦋 Changeset detectedLatest commit: c0b2f35 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Cool, thank you! We should probably do this everywhere :)
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.
Actually, sorry, can you add a changeset? Run npx changeset
and follow the prompts.
Authors: Please fill out this form carefully and completely.
Reviewers: By approving this Pull Request you are approving the code change, as well as its deployment and mitigation plans.
Please read this description carefully. If you feel there is anything unclear or missing, please ask for updates.
What are you trying to accomplish?
I was working on converting a form on dotcom to use the Primer form components (see https://github.com/github/github/pull/307881). We need to test in our component to make sure that certain options are included in the select menu, so we need to allow setting a test selector.
Integration
I don't think we need to change anything in prod for this?
List the issues that this change affects.
Closes #2494.
Risk Assessment
Just allows setting
data-test-selector
whentest_selector
is included in the option arguments.What approach did you choose and why?
Used the
add_test_selector
helper to include the selector in non-production environments. I didn't include anything to do the Primer classify stuff since I don't think you can/should set other Primer arguments on select options.Merge checklist
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.