@@ -24,31 +24,20 @@ describe('Wizard Demo Test', () => {
2424 } ) ;
2525 } ) ;
2626
27- it ( 'Verify in-page wizard step content is focusable and has role only if content overflows' , ( ) => {
28- cy . get ( '#inPageWizWithOverflow .pf-v6-c-wizard__main' ) . should ( 'not.have.attr' , 'tabindex' ) ;
27+ it ( 'Verify in-page wizard step content has role only if content overflows' , ( ) => {
2928 cy . get ( '#inPageWizWithOverflow .pf-v6-c-wizard__main' ) . should ( 'not.have.attr' , 'role' ) ;
30- cy . get ( '#inPageWizWithOverflow .pf-v6-c-wizard__main' ) . click ( ) ;
31- cy . get ( '#inPageWizWithOverflow .pf-v6-c-wizard__main' ) . should ( 'not.have.focus' ) ;
3229 cy . get ( '#inPageWizWithOverflow #inPage-overflow-step-2.pf-v6-c-wizard__nav-link' ) . click ( ) ;
33- cy . get ( '#inPageWizWithOverflow .pf-v6-c-wizard__main' ) . should ( 'have.attr' , 'tabindex' ) ;
3430 cy . get ( '#inPageWizWithOverflow .pf-v6-c-wizard__main' ) . should ( 'have.attr' , 'role' ) . and ( 'eq' , 'region' ) ;
35- cy . get ( '#inPageWizWithOverflow .pf-v6-c-wizard__main' ) . click ( ) ;
36- cy . get ( '#inPageWizWithOverflow .pf-v6-c-wizard__main' ) . should ( 'have.focus' ) ;
3731 } ) ;
3832
39- it ( 'Verify modal wizard step content is focusable only if content overflows' , ( ) => {
40- cy . get ( '#launchWizOverflow' ) . click ( ) ;
41- cy . get ( '#inModalWizWithOverflow.pf-v6-c-wizard' ) . should ( 'exist' ) ;
42- cy . get ( '#inModalWizWithOverflow .pf-v6-c-wizard__main' ) . should ( 'not.have.attr' , 'tabindex' ) ;
43- cy . get ( '#inModalWizWithOverflow .pf-v6-c-wizard__main' ) . should ( 'not.have.attr' , 'role' ) ;
44- cy . get ( '#inModalWizWithOverflow .pf-v6-c-wizard__main' ) . click ( ) ;
45- cy . get ( '#inModalWizWithOverflow .pf-v6-c-wizard__main' ) . should ( 'not.have.focus' ) ;
46- cy . get ( '#inModalWizWithOverflow #modal-overflow-step-2.pf-v6-c-wizard__nav-link' ) . click ( ) ;
47- cy . get ( '#inModalWizWithOverflow main.pf-v6-c-wizard__main' ) . should ( 'exist' ) ;
48- cy . get ( '#inModalWizWithOverflow main.pf-v6-c-wizard__main' ) . should ( 'have.attr' , 'tabindex' ) ;
49- cy . get ( '#inModalWizWithOverflow main.pf-v6-c-wizard__main' ) . click ( ) ;
50- cy . get ( '#inModalWizWithOverflow main.pf-v6-c-wizard__main' ) . should ( 'have.focus' ) ;
51- cy . get ( '#inModalWizWithOverflow .pf-v6-c-wizard__close > button' ) . click ( ) ;
33+ it ( 'Verify in-page wizard step content receives focus only on next or back click' , ( ) => {
34+ cy . get ( '#inPageFocusTest .pf-v6-c-wizard__main' ) . should ( 'not.have.focus' ) ;
35+ cy . get ( '#inPageFocusTest .pf-v6-c-action-list__group button.pf-m-primary' ) . click ( ) ;
36+ cy . get ( '#inPageFocusTest .pf-v6-c-wizard__main' ) . should ( 'have.focus' ) ;
37+ cy . get ( '#inPageFocusTest #inPageFocusTest-wizard-step-b2' ) . click ( ) ;
38+ cy . get ( '#inPageFocusTest .pf-v6-c-wizard__main' ) . should ( 'not.have.focus' ) ;
39+ cy . get ( '#inPageFocusTest .pf-v6-c-action-list__group button.pf-m-secondary' ) . click ( ) ;
40+ cy . get ( '#inPageFocusTest .pf-v6-c-wizard__main' ) . should ( 'have.focus' ) ;
5241 } ) ;
5342
5443 it ( 'Verify modal wizard roles are applied correctly' , ( ) => {
0 commit comments