Skip to content

Commit fb36ae8

Browse files
authored
docs: update note about other query types
1 parent 1cef96f commit fb36ae8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

docs/cypress-testing-library/intro.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ and `queryAllBy` commands off the global `cy` object.
2727
[See the `DOM Testing Library` docs for reference](https://testing-library.com/docs/dom-testing-library/api-queries).
2828

2929
> Note: the `get*` queries are not supported because for reasonable Cypress tests you
30-
> need retryability and `find*` queries already support that. `query*` queries are not
31-
> necessary, but supported.
30+
> need retryability and `find*` queries already support that. `query*` queries are no longer
31+
> necessary since v5 and will be removed in v6. `find*` fully support built-in Cypress
32+
> assertions (removes the only use-case for `query*`).
3233
3334
## With TypeScript
3435

@@ -58,9 +59,6 @@ cy.findByLabelText('Label text', {timeout: 7000}).should('exist')
5859

5960
// findAllByText _inside_ a form element
6061
cy.get('form').findByText('Button Text').should('exist')
61-
cy.get('form').within(() => {
62-
cy.findByText('Button Text').should('exist')
63-
})
6462
cy.get('form').then(subject => {
6563
cy.findByText('Button Text', {container: subject}).should('exist')
6664
})

0 commit comments

Comments
 (0)