@@ -49,7 +49,6 @@ clear to read and to maintain.
49
49
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
50
50
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
51
51
52
-
53
52
- [ Installation] ( #installation )
54
53
- [ Usage] ( #usage )
55
54
- [ With TypeScript] ( #with-typescript )
@@ -424,6 +423,14 @@ An element is visible if **all** the following conditions are met:
424
423
</div >
425
424
<div data-testid =" visible" >Visible Example</div >
426
425
<div data-testid =" hidden-attribute" hidden >Hidden Attribute Example</div >
426
+ <details >
427
+ <summary >Title of hidden text</summary >
428
+ Hidden Details Example
429
+ </details >
430
+ <details open >
431
+ <summary >Title of visible text</summary >
432
+ <div >Visible Details Example</div >
433
+ </details >
427
434
```
428
435
429
436
``` javascript
@@ -433,6 +440,8 @@ expect(getByText('Display None Example')).not.toBeVisible()
433
440
expect (getByText (' Hidden Parent Example' )).not .toBeVisible ()
434
441
expect (getByText (' Visible Example' )).toBeVisible ()
435
442
expect (getByText (' Hidden Attribute Example' )).not .toBeVisible ()
443
+ expect (getByText (' Hidden Details Example' )).not .toBeVisible ()
444
+ expect (getByText (' Visible Details Example' )).toBeVisible ()
436
445
```
437
446
438
447
<hr />
@@ -1204,12 +1213,8 @@ To perform a partial match, you can pass a `RegExp` or use
1204
1213
#### Examples
1205
1214
1206
1215
``` html
1207
- <button aria-label =" Close" aria-describedby =" description-close" >
1208
- X
1209
- </button >
1210
- <div id =" description-close" >
1211
- Closing will discard any changes
1212
- </div >
1216
+ <button aria-label =" Close" aria-describedby =" description-close" >X</button >
1217
+ <div id =" description-close" >Closing will discard any changes</div >
1213
1218
1214
1219
<button >Delete</button >
1215
1220
```
0 commit comments