mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
[CST-15592] add accessibility tests for:
Admin Curation Task Bitstream Format Health Page Metadata Schema
This commit is contained in:
16
cypress/e2e/admin-curation-tasks.cy.ts
Normal file
16
cypress/e2e/admin-curation-tasks.cy.ts
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import { testA11y } from 'cypress/support/utils';
|
||||||
|
|
||||||
|
describe('Admin Curation Tasks', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
// Must login as an Admin to see the page
|
||||||
|
cy.visit('/admin/curation-tasks');
|
||||||
|
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should pass accessibility tests', () => {
|
||||||
|
// Page must first be visible
|
||||||
|
cy.get('ds-admin-curation-task').should('be.visible');
|
||||||
|
// Analyze <ds-admin-curation-task> for accessibility issues
|
||||||
|
testA11y('ds-admin-curation-task');
|
||||||
|
});
|
||||||
|
});
|
@@ -1,6 +1,6 @@
|
|||||||
import { testA11y } from 'cypress/support/utils';
|
import { testA11y } from 'cypress/support/utils';
|
||||||
|
|
||||||
describe('Admin Notifications Publication Claim', () => {
|
describe('Admin Notifications Publication Claim Page', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
// Must login as an Admin to see the page
|
// Must login as an Admin to see the page
|
||||||
cy.visit('/admin/notifications/publication-claim');
|
cy.visit('/admin/notifications/publication-claim');
|
||||||
|
16
cypress/e2e/bitstreams-format.cy.ts
Normal file
16
cypress/e2e/bitstreams-format.cy.ts
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import { testA11y } from 'cypress/support/utils';
|
||||||
|
|
||||||
|
describe('Bitstreams Formats', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
// Must login as an Admin to see the page
|
||||||
|
cy.visit('/admin/registries/bitstream-formats');
|
||||||
|
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should pass accessibility tests', () => {
|
||||||
|
// Page must first be visible
|
||||||
|
cy.get('ds-bitstream-formats').should('be.visible');
|
||||||
|
// Analyze <ds-bitstream-formats> for accessibility issues
|
||||||
|
testA11y('ds-bitstream-formats');
|
||||||
|
});
|
||||||
|
});
|
24
cypress/e2e/health-page.cy.ts
Normal file
24
cypress/e2e/health-page.cy.ts
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
import { testA11y } from 'cypress/support/utils';
|
||||||
|
import { Options } from 'cypress-axe';
|
||||||
|
|
||||||
|
describe('Health Page', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
// Must login as an Admin to see the page
|
||||||
|
cy.visit('/health');
|
||||||
|
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should pass accessibility tests', () => {
|
||||||
|
// Page must first be visible
|
||||||
|
cy.get('ds-health-page').should('be.visible');
|
||||||
|
// Analyze <ds-health-page> for accessibility issues
|
||||||
|
testA11y('ds-health-page', {
|
||||||
|
rules: {
|
||||||
|
// All panels are accordians & 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 },
|
||||||
|
},
|
||||||
|
} as Options);
|
||||||
|
});
|
||||||
|
});
|
@@ -1,6 +1,6 @@
|
|||||||
import { testA11y } from 'cypress/support/utils';
|
import { testA11y } from 'cypress/support/utils';
|
||||||
|
|
||||||
describe('Metadata registry', () => {
|
describe('Metadata Registry', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
// Must login as an Admin to see the page
|
// Must login as an Admin to see the page
|
||||||
cy.visit('/admin/registries/metadata');
|
cy.visit('/admin/registries/metadata');
|
||||||
|
16
cypress/e2e/metadata-schema.cy.ts
Normal file
16
cypress/e2e/metadata-schema.cy.ts
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import { testA11y } from 'cypress/support/utils';
|
||||||
|
|
||||||
|
describe('Metadata Schema', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
// Must login as an Admin to see the page
|
||||||
|
cy.visit('/admin/registries/metadata/dc');
|
||||||
|
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should pass accessibility tests', () => {
|
||||||
|
// Page must first be visible
|
||||||
|
cy.get('ds-metadata-schema').should('be.visible');
|
||||||
|
// Analyze <ds-metadata-schema> for accessibility issues
|
||||||
|
testA11y('ds-metadata-schema');
|
||||||
|
});
|
||||||
|
});
|
Reference in New Issue
Block a user