mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[CST-15592] add accessibility tests for:
Admin Notifications Publication Claim Admin Search Page Bulk Access Create Group Metadata Registry
This commit is contained in:
17
cypress/e2e/admin-notifications-publication-claim-page.cy.ts
Normal file
17
cypress/e2e/admin-notifications-publication-claim-page.cy.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
|
||||
describe('Admin Notifications Publication Claim', () => {
|
||||
beforeEach(() => {
|
||||
// Must login as an Admin to see the page
|
||||
cy.visit('/admin/notifications/publication-claim');
|
||||
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-notifications-publication-claim-page').should('be.visible');
|
||||
// Analyze <ds-admin-notifications-publication-claim-page> for accessibility issues
|
||||
testA11y('ds-admin-notifications-publication-claim-page');
|
||||
});
|
||||
});
|
18
cypress/e2e/admin-search-page.cy.ts
Normal file
18
cypress/e2e/admin-search-page.cy.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
|
||||
describe('Admin Search Page', () => {
|
||||
beforeEach(() => {
|
||||
// Must login as an Admin to see the page
|
||||
cy.visit('/admin/search');
|
||||
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-search-page').should('be.visible');
|
||||
// At least one search result should be displayed
|
||||
cy.get('[data-test="list-object"]').should('be.visible');
|
||||
// Analyze <ds-admin-search-page> for accessibility issues
|
||||
testA11y('ds-admin-search-page');
|
||||
});
|
||||
});
|
@@ -1,7 +1,6 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
|
||||
describe('Batch Import Page', () => {
|
||||
// NOTE: these tests currently assume this query will return results!
|
||||
beforeEach(() => {
|
||||
// Must login as an Admin to see processes
|
||||
cy.visit('/admin/batch-import');
|
||||
|
24
cypress/e2e/bulk-access.cy.ts
Normal file
24
cypress/e2e/bulk-access.cy.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
import { Options } from 'cypress-axe';
|
||||
|
||||
describe('Bulk Access', () => {
|
||||
beforeEach(() => {
|
||||
// Must login as an Admin to see the page
|
||||
cy.visit('/access-control/bulk-access');
|
||||
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-bulk-access').should('be.visible');
|
||||
// Analyze <ds-bulk-access> for accessibility issues
|
||||
testA11y('ds-bulk-access', {
|
||||
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,9 +1,8 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
|
||||
describe('Create Eperson', () => {
|
||||
// NOTE: these tests currently assume this query will return results!
|
||||
beforeEach(() => {
|
||||
// Must login as an Admin to see processes
|
||||
// Must login as an Admin to see the page
|
||||
cy.visit('/access-control/epeople/create');
|
||||
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
|
||||
});
|
||||
|
16
cypress/e2e/create-group.cy.ts
Normal file
16
cypress/e2e/create-group.cy.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
|
||||
describe('Create Group', () => {
|
||||
beforeEach(() => {
|
||||
// Must login as an Admin to see the page
|
||||
cy.visit('/access-control/groups/create');
|
||||
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
|
||||
});
|
||||
|
||||
it('should pass accessibility tests', () => {
|
||||
// Form must first be visible
|
||||
cy.get('ds-group-form').should('be.visible');
|
||||
// Analyze <ds-group-form> for accessibility issues
|
||||
testA11y('ds-group-form');
|
||||
});
|
||||
});
|
@@ -1,9 +1,8 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
|
||||
describe('Edit Eperson', () => {
|
||||
// NOTE: these tests currently assume this query will return results!
|
||||
beforeEach(() => {
|
||||
// Must login as an Admin to see processes
|
||||
// Must login as an Admin to see the page
|
||||
cy.visit('/access-control/epeople/'.concat(Cypress.env('DSPACE_TEST_ADMIN_USER_UUID')).concat('/edit'));
|
||||
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
|
||||
});
|
||||
|
@@ -1,9 +1,8 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
|
||||
describe('Edit Group', () => {
|
||||
// NOTE: these tests currently assume this query will return results!
|
||||
beforeEach(() => {
|
||||
// Must login as an Admin to see processes
|
||||
// Must login as an Admin to see the page
|
||||
cy.visit('/access-control/groups/'.concat(Cypress.env('DSPACE_ADMINISTRATOR_GROUP')).concat('/edit'));
|
||||
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
|
||||
});
|
||||
|
@@ -1,9 +1,8 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
|
||||
describe('Epeople registry', () => {
|
||||
// NOTE: these tests currently assume this query will return results!
|
||||
beforeEach(() => {
|
||||
// Must login as an Admin to see processes
|
||||
// Must login as an Admin to see the page
|
||||
cy.visit('/access-control/epeople');
|
||||
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
|
||||
});
|
||||
|
@@ -1,9 +1,8 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
|
||||
describe('Groups registry', () => {
|
||||
// NOTE: these tests currently assume this query will return results!
|
||||
beforeEach(() => {
|
||||
// Must login as an Admin to see processes
|
||||
// Must login as an Admin to see the page
|
||||
cy.visit('/access-control/groups');
|
||||
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
|
||||
});
|
||||
|
@@ -1,9 +1,8 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
|
||||
describe('Metadata Import Page', () => {
|
||||
// NOTE: these tests currently assume this query will return results!
|
||||
beforeEach(() => {
|
||||
// Must login as an Admin to see processes
|
||||
// Must login as an Admin to see the page
|
||||
cy.visit('/admin/metadata-import');
|
||||
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
|
||||
});
|
||||
|
16
cypress/e2e/metadata-registry.cy.ts
Normal file
16
cypress/e2e/metadata-registry.cy.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
|
||||
describe('Metadata registry', () => {
|
||||
beforeEach(() => {
|
||||
// Must login as an Admin to see the page
|
||||
cy.visit('/admin/registries/metadata');
|
||||
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-registry').should('be.visible');
|
||||
// Analyze <ds-metadata-registry> for accessibility issues
|
||||
testA11y('ds-metadata-registry');
|
||||
});
|
||||
});
|
@@ -1,9 +1,8 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
|
||||
describe('New Process', () => {
|
||||
// NOTE: these tests currently assume this query will return results!
|
||||
beforeEach(() => {
|
||||
// Must login as an Admin to see processes
|
||||
// Must login as an Admin to see the page
|
||||
cy.visit('/processes/new');
|
||||
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
|
||||
});
|
||||
|
@@ -1,9 +1,8 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
|
||||
describe('Processes Overview', () => {
|
||||
// NOTE: these tests currently assume this query will return results!
|
||||
beforeEach(() => {
|
||||
// Must login as an Admin to see processes
|
||||
// Must login as an Admin to see the page
|
||||
cy.visit('/processes');
|
||||
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
|
||||
});
|
||||
|
@@ -1,9 +1,8 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
|
||||
describe('Quality Assurance Source Page', () => {
|
||||
// NOTE: these tests currently assume this query will return results!
|
||||
beforeEach(() => {
|
||||
// Must login as an Admin to see processes
|
||||
// Must login as an Admin to see the page
|
||||
cy.visit('/notifications/quality-assurance');
|
||||
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
|
||||
});
|
||||
|
Reference in New Issue
Block a user