-
Notifications
You must be signed in to change notification settings - Fork 3.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
feat: support data-qa selector in selector playground #25475
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.
Seems fine to add this for Studio. I was surprised when I noticed that Studio doesn't seem to use the onElement
callback available for Selector Playground, since it would be good to customize this for recording tests. #25305 (comment)
@lmiller1990 You say it's common to use |
@emilyrohrbough I mainly used my intuition and anecdotal experience here, but for some numbers, checking GitHub:
For comparison:
Not as popular but still common enough (imo). Thoughts? I think this is common enough to justify adding, and there's little to no downside. |
@lmiller1990 Sounds good to me to add |
Oh oops, good point @emilyrohrbough, updated it. #25305 (Cypress Studio to utilize data-qa attribute if present for element selection) |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
User facing changelog
Support
data-qa
selector in Selector Playground in addition todata-cy
,data-test
anddata-testid
.Additional details
It's common to use
data-qa
when indicating selectors used in End to End tests. QA engineers are one of the most common cohorts using Cypress Studio, so it follows we should respectdata-qa
alongsidedata-test*
anddata-cy
.Steps to test
You can point this branch at a project with
data-qa
and try using Selector Playground. I also recorded a video so you can see it in action.simplescreenrecorder-2023-01-17_11.15.19.mp4
How has the user experience changed?
PR Tasks
cypress-documentation
? docs: document data-qa selector cypress-documentation#4986type definitions
?