Skip to content
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

docs: document data-qa selector #4986

Merged
merged 3 commits into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/guides/references/cypress-studio.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ describe('Cypress Studio Demo', () => {
})
```

The selectors are generated according to the
[`Cypress.SelectorPlayground` selector priority](/api/cypress-api/selector-playground-api#Default-Selector-Priority).

### Adding a New Test

You can add a new test to any existing `describe` or `context` block, by
Expand Down
13 changes: 7 additions & 6 deletions docs/partials/_default-selector-priority.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
**_Default Selector Priority:_**
### Default Selector Priority

1. `data-cy`
2. `data-test`
3. `data-testid`
4. `id`
5. `class`
6. `tag`
7. `attributes`
8. `nth-child`
4. `data-qa`
5. `id`
6. `class`
7. `tag`
8. `attributes`
9. `nth-child`