Skip to content

Commit

Permalink
docs: document data-qa selector (#4986)
Browse files Browse the repository at this point in the history
* docs: document data-qa selector

* chore: fix lint
  • Loading branch information
lmiller1990 authored Jan 20, 2023
1 parent 021b267 commit ea43666
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
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`

0 comments on commit ea43666

Please sign in to comment.