-
Notifications
You must be signed in to change notification settings - Fork 8.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
Test selection attribute #5001
Comments
I'm currently leaning towards |
If you're leaning toward data-test-roles, should that be singular? (similar to the class attribute) |
I'm open to that, but as I'm starting to use it in a test I don't really like how it looks as a helper function: |
I'm working it into a pr right now |
data-test-subject? e.g. $.findTestSubjects('link appLink') |
I like subject, maybe we can abbreviate? |
+1 on data-test-subject |
Closing this because we're using |
We need to choose a way to support selecting elements from with tests. Currently we do this with a combination of CSS selectors and id's, but those have well established issues. In order to circuvent those
issues @epixa suggested we use data attributes (see) to select the elements.
@Bargs suggested we stick with the
data-*
prefix but pick a name that obviously maps the attribute to it's intended purpose: providing selectors for tests.Thoughts? Please extend the lists below or comment and a contributor will add your suggestion to the list.
Goals of the selector:
class
)Options:
data-tselect
data-testselect
data-purpose
purpose
data-test-roles
data-test-subject
data-test-subj
The text was updated successfully, but these errors were encountered: