@@ -3,12 +3,32 @@ describe('Description List Demo Test', () => {
3
3
cy . visit ( 'http://localhost:3000/description-list-demo-nav-link' ) ;
4
4
} ) ;
5
5
6
- it ( 'Verify list with help text' , ( ) => {
6
+ it ( 'Verify list with help text triggered with mouse ' , ( ) => {
7
7
cy . get ( '#description-list-help-text' ) . should ( 'exist' ) . children ( '.pf-v6-c-description-list__group' ) ;
8
8
cy . get ( '.pf-v6-c-popover__content' ) . should ( 'not.exist' ) ;
9
9
cy . get (
10
10
'#description-list-help-text > :nth-child(1) > .pf-v6-c-description-list__term .pf-v6-c-description-list__text'
11
11
) . click ( ) ;
12
12
cy . get ( '.pf-v6-c-popover__content' ) . should ( 'exist' ) ;
13
+ cy . get ( '.pf-v6-c-popover__close' ) . click ( ) ;
14
+ cy . get ( '.pf-v6-c-popover__content' ) . should ( 'not.exist' ) ;
15
+ } ) ;
16
+
17
+ it ( 'Verify list with help text triggered with enter key' , ( ) => {
18
+ cy . get ( '#description-list-help-text' ) . should ( 'exist' ) . children ( '.pf-v6-c-description-list__group' ) ;
19
+ cy . get ( '.pf-v6-c-popover__content' ) . should ( 'not.exist' ) ;
20
+ cy . tab ( ) . type ( '{enter}' ) ;
21
+ cy . get ( '.pf-v6-c-popover__content' ) . should ( 'exist' ) ;
22
+ cy . get ( '.pf-v6-c-popover__close' ) . type ( '{enter}' ) ;
23
+ cy . get ( '.pf-v6-c-popover__content' ) . should ( 'not.exist' ) ;
24
+ } ) ;
25
+
26
+ it ( 'Verify list with help text triggered with spacebar' , ( ) => {
27
+ cy . get ( '#description-list-help-text' ) . should ( 'exist' ) . children ( '.pf-v6-c-description-list__group' ) ;
28
+ cy . get ( '.pf-v6-c-popover__content' ) . should ( 'not.exist' ) ;
29
+ cy . tab ( ) . tab ( ) . type ( ' ' ) ;
30
+ cy . get ( '.pf-v6-c-popover__content' ) . should ( 'exist' ) ;
31
+ cy . get ( '.pf-v6-c-popover__close' ) . type ( ' ' ) ;
32
+ cy . get ( '.pf-v6-c-popover__content' ) . should ( 'not.exist' ) ;
13
33
} ) ;
14
34
} ) ;
0 commit comments