@@ -109,6 +109,9 @@ describe('Login Modal', () => {
109109 cy . get ( 'ds-themed-navbar [data-test="register"]' ) . click ( ) ;
110110 cy . location ( 'pathname' ) . should ( 'eq' , '/register' ) ;
111111 cy . get ( 'ds-register-email' ) . should ( 'exist' ) ;
112+
113+ // Test accessibility of this page
114+ testA11y ( 'ds-register-email' ) ;
112115 } ) ;
113116
114117 it ( 'should allow forgot password' , ( ) => {
@@ -123,16 +126,26 @@ describe('Login Modal', () => {
123126 cy . get ( 'ds-themed-navbar [data-test="forgot"]' ) . click ( ) ;
124127 cy . location ( 'pathname' ) . should ( 'eq' , '/forgot' ) ;
125128 cy . get ( 'ds-forgot-email' ) . should ( 'exist' ) ;
129+
130+ // Test accessibility of this page
131+ testA11y ( 'ds-forgot-email' ) ;
126132 } ) ;
127133
128- it ( 'should pass accessibility tests' , ( ) => {
134+ it ( 'should pass accessibility tests in menus ' , ( ) => {
129135 cy . visit ( '/' ) ;
130136
137+ // Open login menu & verify accessibility
131138 page . openLoginMenu ( ) ;
132-
133139 cy . get ( 'ds-log-in' ) . should ( 'exist' ) ;
134-
135- // Analyze <ds-log-in> for accessibility issues
136140 testA11y ( 'ds-log-in' ) ;
141+
142+ // Now login
143+ page . submitLoginAndPasswordByPressingButton ( TEST_ADMIN_USER , TEST_ADMIN_PASSWORD ) ;
144+ cy . get ( 'ds-log-in' ) . should ( 'not.exist' ) ;
145+
146+ // Open user menu, verify user menu accesibility
147+ page . openUserMenu ( ) ;
148+ cy . get ( 'ds-user-menu' ) . should ( 'be.visible' ) ;
149+ testA11y ( 'ds-user-menu' ) ;
137150 } ) ;
138151} ) ;
0 commit comments