Skip to content

Commit 4cd55d6

Browse files
[CST-15592] add accessibility tests for:
Admin Add New Modals Admin Edit Modals Admin Export Modals Admin Workflow Page End User Agreement Feedback Profile Page System Wide Alert
1 parent d12d0fa commit 4cd55d6

13 files changed

Lines changed: 233 additions & 4 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import { testA11y } from 'cypress/support/utils';
2+
3+
describe('Admin Add New Modals', () => {
4+
beforeEach(() => {
5+
// Must login as an Admin for sidebar to appear
6+
cy.visit('/login');
7+
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
8+
});
9+
10+
it('Add new Community modal should pass accessibility tests', () => {
11+
// Pin the sidebar open
12+
cy.get('#sidebar-collapse-toggle').click();
13+
14+
// Click on entry of menu
15+
cy.get('#admin-menu-section-new-title').click();
16+
17+
cy.get('a[title="menu.section.new_community"]').click();
18+
19+
// Analyze <ds-create-community-parent-selector> for accessibility
20+
testA11y('ds-create-community-parent-selector');
21+
});
22+
23+
it('Add new Collection modal should pass accessibility tests', () => {
24+
// Pin the sidebar open
25+
cy.get('#sidebar-collapse-toggle').click();
26+
27+
// Click on entry of menu
28+
cy.get('#admin-menu-section-new-title').click();
29+
30+
cy.get('a[title="menu.section.new_collection"]').click();
31+
32+
// Analyze <ds-create-collection-parent-selector> for accessibility
33+
testA11y('ds-create-collection-parent-selector');
34+
});
35+
36+
it('Add new Item modal should pass accessibility tests', () => {
37+
// Pin the sidebar open
38+
cy.get('#sidebar-collapse-toggle').click();
39+
40+
// Click on entry of menu
41+
cy.get('#admin-menu-section-new-title').click();
42+
43+
cy.get('a[title="menu.section.new_item"]').click();
44+
45+
// Analyze <ds-create-item-parent-selector> for accessibility
46+
testA11y('ds-create-item-parent-selector');
47+
});
48+
});
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import { testA11y } from 'cypress/support/utils';
2+
3+
describe('Admin Edit Modals', () => {
4+
beforeEach(() => {
5+
// Must login as an Admin for sidebar to appear
6+
cy.visit('/login');
7+
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
8+
});
9+
10+
it('Edit Community modal should pass accessibility tests', () => {
11+
// Pin the sidebar open
12+
cy.get('#sidebar-collapse-toggle').click();
13+
14+
// Click on entry of menu
15+
cy.get('#admin-menu-section-edit-title').click();
16+
17+
cy.get('a[title="menu.section.edit_community"]').click();
18+
19+
// Analyze <ds-edit-community-selector> for accessibility
20+
testA11y('ds-edit-community-selector');
21+
});
22+
23+
it('Edit Collection modal should pass accessibility tests', () => {
24+
// Pin the sidebar open
25+
cy.get('#sidebar-collapse-toggle').click();
26+
27+
// Click on entry of menu
28+
cy.get('#admin-menu-section-edit-title').click();
29+
30+
cy.get('a[title="menu.section.edit_collection"]').click();
31+
32+
// Analyze <ds-edit-collection-selector> for accessibility
33+
testA11y('ds-edit-collection-selector');
34+
});
35+
36+
it('Edit Item modal should pass accessibility tests', () => {
37+
// Pin the sidebar open
38+
cy.get('#sidebar-collapse-toggle').click();
39+
40+
// Click on entry of menu
41+
cy.get('#admin-menu-section-edit-title').click();
42+
43+
cy.get('a[title="menu.section.edit_item"]').click();
44+
45+
// Analyze <ds-edit-item-selector> for accessibility
46+
testA11y('ds-edit-item-selector');
47+
});
48+
});
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { testA11y } from 'cypress/support/utils';
2+
3+
describe('Admin Export Modals', () => {
4+
beforeEach(() => {
5+
// Must login as an Admin for sidebar to appear
6+
cy.visit('/login');
7+
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
8+
});
9+
10+
it('Export metadata modal should pass accessibility tests', () => {
11+
// Pin the sidebar open
12+
cy.get('#sidebar-collapse-toggle').click();
13+
14+
// Click on entry of menu
15+
cy.get('#admin-menu-section-export-title').click();
16+
17+
cy.get('a[title="menu.section.export_metadata"]').click();
18+
19+
// Analyze <ds-export-metadata-selector> for accessibility
20+
testA11y('ds-export-metadata-selector');
21+
});
22+
23+
it('Export batch modal should pass accessibility tests', () => {
24+
// Pin the sidebar open
25+
cy.get('#sidebar-collapse-toggle').click();
26+
27+
// Click on entry of menu
28+
cy.get('#admin-menu-section-export-title').click();
29+
30+
cy.get('a[title="menu.section.export_batch"]').click();
31+
32+
// Analyze <ds-export-batch-selector> for accessibility
33+
testA11y('ds-export-batch-selector');
34+
});
35+
});
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { testA11y } from 'cypress/support/utils';
2+
3+
describe('Admin Workflow Page', () => {
4+
beforeEach(() => {
5+
// Must login as an Admin to see the page
6+
cy.visit('/admin/workflow');
7+
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
8+
});
9+
10+
it('should pass accessibility tests', () => {
11+
// Page must first be visible
12+
cy.get('ds-admin-workflow-page').should('be.visible');
13+
// At least one search result should be displayed
14+
cy.get('[data-test="list-object"]').should('be.visible');
15+
// Analyze <ds-admin-workflow-page> for accessibility issues
16+
testA11y('ds-admin-workflow-page');
17+
});
18+
});
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { testA11y } from 'cypress/support/utils';
2+
3+
describe('End User Agreement', () => {
4+
it('should pass accessibility tests', () => {
5+
cy.visit('/info/end-user-agreement');
6+
7+
// Page must first be visible
8+
cy.get('ds-end-user-agreement').should('be.visible');
9+
10+
// Analyze <ds-end-user-agreement> for accessibility
11+
testA11y('ds-end-user-agreement');
12+
});
13+
});

cypress/e2e/feedback.cy.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { testA11y } from 'cypress/support/utils';
2+
3+
describe('Feedback', () => {
4+
it('should pass accessibility tests', () => {
5+
cy.visit('/info/feedback');
6+
7+
// Page must first be visible
8+
cy.get('ds-feedback').should('be.visible');
9+
10+
// Analyze <ds-feedback> for accessibility
11+
testA11y('ds-feedback');
12+
});
13+
});

cypress/e2e/privacy.cy.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { testA11y } from 'cypress/support/utils';
2+
3+
describe('Privacy', () => {
4+
it('should pass accessibility tests', () => {
5+
cy.visit('/info/privacy');
6+
7+
// Page must first be visible
8+
cy.get('ds-privacy').should('be.visible');
9+
10+
// Analyze <ds-privacy> for accessibility
11+
testA11y('ds-privacy');
12+
});
13+
});

cypress/e2e/profile-page.cy.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { testA11y } from 'cypress/support/utils';
2+
3+
describe('Profile page', () => {
4+
beforeEach(() => {
5+
// Must login as an Admin to see the page
6+
cy.visit('/profile');
7+
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
8+
});
9+
10+
it('should pass accessibility tests', () => {
11+
// Process form must first be visible
12+
cy.get('ds-profile-page').should('be.visible');
13+
// Analyze <ds-profile-page> for accessibility issues
14+
testA11y('ds-profile-page');
15+
});
16+
});
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { testA11y } from 'cypress/support/utils';
2+
3+
describe('System Wide Alert', () => {
4+
beforeEach(() => {
5+
// Must login as an Admin to see the page
6+
cy.visit('/admin/system-wide-alert');
7+
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
8+
});
9+
10+
it('should pass accessibility tests', () => {
11+
// Page must first be visible
12+
cy.get('ds-system-wide-alert-form').should('be.visible');
13+
// Analyze <ds-system-wide-alert-form> for accessibility issues
14+
testA11y('ds-system-wide-alert-form');
15+
});
16+
});

src/app/info/end-user-agreement/end-user-agreement-content/end-user-agreement-content.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ <h2>Site management</h2>
6363
<p>We reserve the right, but not the obligation, to: (1) monitor the Site for violations of these Terms of Use; (2) take appropriate legal action against anyone who, in our sole discretion, violates the law or these Terms of Use, including without limitation, reporting such user to law enforcement authorities; (3) in our sole discretion and without limitation, refuse, restrict access to, limit the availability of, or disable (to the extent technologically feasible) any of your Contributions or any portion thereof; (4) in our sole discretion and without limitation, notice, or liability, to remove from the Site or otherwise disable all files and content that are excessive in size or are in any way burdensome to our systems; and (5) otherwise manage the Site in a manner designed to protect our rights and property and to facilitate the proper functioning of the Site.</p>
6464

6565
<h2>Privacy policy</h2>
66-
<p>We care about data privacy and security. Please review our <a [routerLink]="['/info/privacy']" target="_blank" rel="noopener noreferrer">Privacy Policy</a>. By using the Site, you agree to be bound by our Privacy Policy, which is incorporated into these Terms of Use.</p>
66+
<p>We care about data privacy and security. Please review our <a class="link-contrast" [routerLink]="['/info/privacy']" target="_blank" rel="noopener noreferrer">Privacy Policy</a>. By using the Site, you agree to be bound by our Privacy Policy, which is incorporated into these Terms of Use.</p>
6767
<p>Please be advised the Site is hosted in {{ 'info.end-user-agreement.hosting-country' | translate }}. If you access the Site from any other region of the world with laws or other requirements governing personal data collection, use, or disclosure that differ from applicable laws in {{ 'info.end-user-agreement.hosting-country' | translate }}, then through your continued use of the Site, you are transferring your data to {{ 'info.end-user-agreement.hosting-country' | translate }}, and you agree to have your data transferred to and processed in {{ 'info.end-user-agreement.hosting-country' | translate }}.</p>
6868

6969
<h2>Term and termination</h2>
@@ -92,4 +92,4 @@ <h2>User Data</h2>
9292
<h2>Miscellaneous</h2>
9393
<p>These Terms of Use and any policies or operating rules posted by us on the Site or in respect to the Site constitute the entire agreement and understanding between you and us. Our failure to exercise or enforce any right or provision of these Terms of Use shall not operate as a waiver of such right or provision. These Terms of Use operate to the fullest extent permissible by law. We may assign any or all of our rights and obligations to others at any time. We shall not be responsible or liable for any loss, damage, delay, or failure to act caused by any cause beyond our reasonable control. If any provision or part of a provision of these Terms of Use is determined to be unlawful, void, or unenforceable, that provision or part of the provision is deemed severable from these Terms of Use and does not affect the validity and enforceability of any remaining provisions. There is no joint venture, partnership, employment or agency relationship created between you and us as a result of these Terms of Use or use of the Site. You agree that these Terms of Use will not be construed against us by virtue of having drafted them. You hereby waive any and all defenses you may have based on the electronic form of these Terms of Use and the lack of signing by the parties hereto to execute these Terms of Use.</p>
9494

95-
<p><a [routerLink]="'.'" fragment="ref-a" id="comment-a">[a]</a>&nbsp;The DSpace software used to run this site is open source. Options for reuse and reproduction of the DSpace software is governed by its open source license: <a href="https://github.com/DSpace/DSpace/blob/main/LICENSE" target="_blank" rel="noopener noreferrer">https://github.com/DSpace/DSpace/blob/main/LICENSE</a></p>
95+
<p><a class="link-contrast" [routerLink]="'.'" fragment="ref-a" id="comment-a">[a]</a>&nbsp;The DSpace software used to run this site is open source. Options for reuse and reproduction of the DSpace software is governed by its open source license: <a class="link-contrast" href="https://github.com/DSpace/DSpace/blob/main/LICENSE" target="_blank" rel="noopener noreferrer">https://github.com/DSpace/DSpace/blob/main/LICENSE</a></p>

0 commit comments

Comments
 (0)