|
1 | 1 | import { testA11y } from 'cypress/support/utils'; |
2 | 2 | import { Options } from 'cypress-axe'; |
3 | 3 |
|
4 | | -describe('Health Page', () => { |
5 | | - beforeEach(() => { |
6 | | - // Must login as an Admin to see the page |
7 | | - cy.visit('/health'); |
8 | | - cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD')); |
| 4 | + |
| 5 | +beforeEach(() => { |
| 6 | + // Must login as an Admin to see the page |
| 7 | + cy.visit('/health'); |
| 8 | + cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD')); |
| 9 | +}); |
| 10 | + |
| 11 | +describe('Health Page > Status Tab', () => { |
| 12 | + it('should pass accessibility tests', () => { |
| 13 | + // Page must first be visible |
| 14 | + cy.get('ds-health-page').should('be.visible'); |
| 15 | + // Analyze <ds-health-page> for accessibility issues |
| 16 | + testA11y('ds-health-page', { |
| 17 | + rules: { |
| 18 | + // All panels are accordians & fail "aria-required-children" and "nested-interactive". |
| 19 | + // Seem to require updating ng-bootstrap and https://github.com/DSpace/dspace-angular/issues/2216 |
| 20 | + 'aria-required-children': { enabled: false }, |
| 21 | + 'nested-interactive': { enabled: false }, |
| 22 | + }, |
| 23 | + } as Options); |
9 | 24 | }); |
| 25 | +}); |
10 | 26 |
|
| 27 | +describe('Health Page > Info Tab', () => { |
11 | 28 | it('should pass accessibility tests', () => { |
12 | 29 | // Page must first be visible |
13 | 30 | cy.get('ds-health-page').should('be.visible'); |
| 31 | + cy.get('a[data-test="health-page.info-tab"]').click(); |
| 32 | + |
14 | 33 | // Analyze <ds-health-page> for accessibility issues |
15 | 34 | testA11y('ds-health-page', { |
16 | 35 | rules: { |
|
0 commit comments