@@ -10,8 +10,15 @@ beforeEach(() => {
1010
1111describe ( 'Health Page > Status Tab' , ( ) => {
1212 it ( 'should pass accessibility tests' , ( ) => {
13+ cy . get ( 'a[data-test="health-page.status-tab"]' ) . click ( ) ;
1314 // Page must first be visible
1415 cy . get ( 'ds-health-page' ) . should ( 'be.visible' ) ;
16+ cy . get ( 'ds-health-panel' ) . should ( 'be.visible' ) ;
17+
18+ // wait for all the ds-health-info-component components to be rendered
19+ cy . get ( 'div[role="tabpanel"]' ) . each ( ( $panel : HTMLDivElement ) => {
20+ cy . wrap ( $panel ) . find ( 'ds-health-component' ) . should ( 'be.visible' ) ;
21+ } ) ;
1522 // Analyze <ds-health-page> for accessibility issues
1623 testA11y ( 'ds-health-page' , {
1724 rules : {
@@ -26,16 +33,21 @@ describe('Health Page > Status Tab', () => {
2633
2734describe ( 'Health Page > Info Tab' , ( ) => {
2835 it ( 'should pass accessibility tests' , ( ) => {
36+
37+ cy . get ( 'a[data-test="health-page.info-tab"]' ) . click ( ) ;
2938 // Page must first be visible
3039 cy . get ( 'ds-health-page' ) . should ( 'be.visible' ) ;
31- cy . get ( 'a[data-test="health-page.info-tab"]' ) . click ( ) ;
32-
3340 cy . get ( 'ds-health-info' ) . should ( 'be.visible' ) ;
3441
42+ // wait for all the ds-health-info-component components to be rendered
43+ cy . get ( 'div[role="tabpanel"]' ) . each ( ( $panel : HTMLDivElement ) => {
44+ cy . wrap ( $panel ) . find ( 'ds-health-info-component' ) . should ( 'be.visible' ) ;
45+ } ) ;
46+
3547 // Analyze <ds-health-info> for accessibility issues
3648 testA11y ( 'ds-health-info' , {
3749 rules : {
38- // All panels are accordians & fail "aria-required-children" and "nested-interactive".
50+ // All panels are accordions & fail "aria-required-children" and "nested-interactive".
3951 // Seem to require updating ng-bootstrap and https://github.com/DSpace/dspace-angular/issues/2216
4052 'aria-required-children' : { enabled : false } ,
4153 'nested-interactive' : { enabled : false } ,
0 commit comments