mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
[CST-15592] refine health page tests
(cherry picked from commit f131ae2f6b
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
a80b324f1f
commit
dfd698c914
@@ -10,8 +10,15 @@ beforeEach(() => {
|
||||
|
||||
describe('Health Page > Status Tab', () => {
|
||||
it('should pass accessibility tests', () => {
|
||||
cy.get('a[data-test="health-page.status-tab"]').click();
|
||||
// Page must first be visible
|
||||
cy.get('ds-health-page').should('be.visible');
|
||||
cy.get('ds-health-panel').should('be.visible');
|
||||
|
||||
// wait for all the ds-health-info-component components to be rendered
|
||||
cy.get('div[role="tabpanel"]').each(($panel: HTMLDivElement) => {
|
||||
cy.wrap($panel).find('ds-health-component').should('be.visible');
|
||||
});
|
||||
// Analyze <ds-health-page> for accessibility issues
|
||||
testA11y('ds-health-page', {
|
||||
rules: {
|
||||
@@ -26,16 +33,21 @@ describe('Health Page > Status Tab', () => {
|
||||
|
||||
describe('Health Page > Info Tab', () => {
|
||||
it('should pass accessibility tests', () => {
|
||||
|
||||
cy.get('a[data-test="health-page.info-tab"]').click();
|
||||
// Page must first be visible
|
||||
cy.get('ds-health-page').should('be.visible');
|
||||
cy.get('a[data-test="health-page.info-tab"]').click();
|
||||
|
||||
cy.get('ds-health-info').should('be.visible');
|
||||
|
||||
// wait for all the ds-health-info-component components to be rendered
|
||||
cy.get('div[role="tabpanel"]').each(($panel: HTMLDivElement) => {
|
||||
cy.wrap($panel).find('ds-health-info-component').should('be.visible');
|
||||
});
|
||||
|
||||
// Analyze <ds-health-info> for accessibility issues
|
||||
testA11y('ds-health-info', {
|
||||
rules: {
|
||||
// All panels are accordians & fail "aria-required-children" and "nested-interactive".
|
||||
// All panels are accordions & fail "aria-required-children" and "nested-interactive".
|
||||
// Seem to require updating ng-bootstrap and https://github.com/DSpace/dspace-angular/issues/2216
|
||||
'aria-required-children': { enabled: false },
|
||||
'nested-interactive': { enabled: false },
|
||||
|
Reference in New Issue
Block a user