mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-12 12:33:07 +00:00
Add basic accessibility scan for most public pages. Disable any a11y tests with known issues
This commit is contained in:
23
cypress/integration/collection-page.spec.ts
Normal file
23
cypress/integration/collection-page.spec.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { Options } from "cypress-axe";
|
||||
import { TEST_COLLECTION } from "cypress/support";
|
||||
|
||||
describe('Collection Page', () => {
|
||||
|
||||
it('should pass accessibility tests', () => {
|
||||
cy.visit('/collections/' + TEST_COLLECTION);
|
||||
cy.injectAxe();
|
||||
|
||||
// <ds-collection-page> tag must be loaded
|
||||
cy.get('ds-collection-page').should('exist');
|
||||
|
||||
// Analyze <ds-collection-page> for accessibility issues
|
||||
// Disable color-contrast checks until it is fixed (see #1202 and #1178)
|
||||
cy.checkA11y('ds-collection-page',
|
||||
{
|
||||
rules: {
|
||||
'color-contrast': { enabled: false }
|
||||
}
|
||||
} as Options
|
||||
);
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user