@@ -245,7 +245,7 @@ const inputNode = screen.getByPlaceholderText('Username')
245
245
<!-- Cypress-->
246
246
247
247
``` js
248
- cy .getByPlaceholderText (' Username' ).should (' exist' )
248
+ cy .findByPlaceholderText (' Username' ).should (' exist' )
249
249
```
250
250
251
251
<!-- END_DOCUSAURUS_CODE_TABS-->
@@ -301,7 +301,7 @@ const aboutAnchorNode = screen.getByText(/about/i)
301
301
<!-- Cypress-->
302
302
303
303
``` js
304
- cy .getByText (/ about/ i ).should (' exist' )
304
+ cy .findByText (/ about/ i ).should (' exist' )
305
305
```
306
306
307
307
<!-- END_DOCUSAURUS_CODE_TABS-->
@@ -376,7 +376,7 @@ const incrediblesPosterImg = screen.getByAltText(/incredibles.*? poster/i)
376
376
<!-- Cypress-->
377
377
378
378
``` js
379
- cy .getByAltText (/ incredibles. *? poster/ i ).should (' exist' )
379
+ cy .findByAltText (/ incredibles. *? poster/ i ).should (' exist' )
380
380
```
381
381
382
382
<!-- END_DOCUSAURUS_CODE_TABS-->
@@ -432,8 +432,8 @@ const closeElement = screen.getByTitle('Close')
432
432
<!-- Cypress-->
433
433
434
434
``` js
435
- cy .getByTitle (' Delete' ).should (' exist' )
436
- cy .getByTitle (' Close' ).should (' exist' )
435
+ cy .findByTitle (' Delete' ).should (' exist' )
436
+ cy .findByTitle (' Close' ).should (' exist' )
437
437
```
438
438
439
439
<!-- END_DOCUSAURUS_CODE_TABS-->
@@ -488,7 +488,7 @@ const lastNameInput = screen.getByDisplayValue('Norris')
488
488
<!-- Cypress-->
489
489
490
490
``` js
491
- cy .getByDisplayValue (' Norris' ).should (' exist' )
491
+ cy .findByDisplayValue (' Norris' ).should (' exist' )
492
492
```
493
493
494
494
<!-- END_DOCUSAURUS_CODE_TABS-->
@@ -525,7 +525,7 @@ const messageTextArea = screen.getByDisplayValue('Hello World')
525
525
<!-- Cypress-->
526
526
527
527
``` js
528
- cy .getByDisplayValue (' Hello World' ).should (' exist' )
528
+ cy .findByDisplayValue (' Hello World' ).should (' exist' )
529
529
```
530
530
531
531
<!-- END_DOCUSAURUS_CODE_TABS-->
@@ -566,7 +566,7 @@ const selectElement = screen.getByDisplayValue('Alaska')
566
566
<!-- Cypress-->
567
567
568
568
``` js
569
- cy .getByDisplayValue (' Alaska' ).should (' exist' )
569
+ cy .findByDisplayValue (' Alaska' ).should (' exist' )
570
570
```
571
571
572
572
<!-- END_DOCUSAURUS_CODE_TABS-->
@@ -641,7 +641,7 @@ assertions about the `Open dialog`-button you would need to use
641
641
The default value for ` hidden ` can [ be configured] ( api-configuration#configuration ) .
642
642
643
643
Certain roles can have a selected state. You can filter the
644
- returned elements that by their selected state
644
+ returned elements by their selected state
645
645
by setting ` selected: true ` or ` selected: false ` .
646
646
647
647
For example in
@@ -686,7 +686,7 @@ const dialogContainer = screen.getByRole('dialog')
686
686
<!-- Cypress-->
687
687
688
688
``` js
689
- cy .getByRole (' dialog' ).should (' exist' )
689
+ cy .findByRole (' dialog' ).should (' exist' )
690
690
```
691
691
692
692
<!-- END_DOCUSAURUS_CODE_TABS-->
@@ -735,7 +735,7 @@ const element = screen.getByTestId('custom-element')
735
735
<!-- Cypress-->
736
736
737
737
``` js
738
- cy .getByTestId (' custom-element' ).should (' exist' )
738
+ cy .findByTestId (' custom-element' ).should (' exist' )
739
739
```
740
740
741
741
<!-- END_DOCUSAURUS_CODE_TABS-->
0 commit comments