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 Add New Modals
Admin Edit Modals
Admin Export Modals
Admin Workflow Page
End User Agreement
Feedback
Profile Page
System Wide Alert
(cherry picked from commit 4cd55d6669
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
bae0442ede
commit
48d74ee2cd
48
cypress/e2e/admin-add-new-modals.cy.ts
Normal file
48
cypress/e2e/admin-add-new-modals.cy.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
|
||||
describe('Admin Add New Modals', () => {
|
||||
beforeEach(() => {
|
||||
// Must login as an Admin for sidebar to appear
|
||||
cy.visit('/login');
|
||||
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
|
||||
});
|
||||
|
||||
it('Add new Community modal should pass accessibility tests', () => {
|
||||
// Pin the sidebar open
|
||||
cy.get('#sidebar-collapse-toggle').click();
|
||||
|
||||
// Click on entry of menu
|
||||
cy.get('#admin-menu-section-new-title').click();
|
||||
|
||||
cy.get('a[title="menu.section.new_community"]').click();
|
||||
|
||||
// Analyze <ds-create-community-parent-selector> for accessibility
|
||||
testA11y('ds-create-community-parent-selector');
|
||||
});
|
||||
|
||||
it('Add new Collection modal should pass accessibility tests', () => {
|
||||
// Pin the sidebar open
|
||||
cy.get('#sidebar-collapse-toggle').click();
|
||||
|
||||
// Click on entry of menu
|
||||
cy.get('#admin-menu-section-new-title').click();
|
||||
|
||||
cy.get('a[title="menu.section.new_collection"]').click();
|
||||
|
||||
// Analyze <ds-create-collection-parent-selector> for accessibility
|
||||
testA11y('ds-create-collection-parent-selector');
|
||||
});
|
||||
|
||||
it('Add new Item modal should pass accessibility tests', () => {
|
||||
// Pin the sidebar open
|
||||
cy.get('#sidebar-collapse-toggle').click();
|
||||
|
||||
// Click on entry of menu
|
||||
cy.get('#admin-menu-section-new-title').click();
|
||||
|
||||
cy.get('a[title="menu.section.new_item"]').click();
|
||||
|
||||
// Analyze <ds-create-item-parent-selector> for accessibility
|
||||
testA11y('ds-create-item-parent-selector');
|
||||
});
|
||||
});
|
48
cypress/e2e/admin-edit-modals.cy.ts
Normal file
48
cypress/e2e/admin-edit-modals.cy.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
|
||||
describe('Admin Edit Modals', () => {
|
||||
beforeEach(() => {
|
||||
// Must login as an Admin for sidebar to appear
|
||||
cy.visit('/login');
|
||||
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
|
||||
});
|
||||
|
||||
it('Edit Community modal should pass accessibility tests', () => {
|
||||
// Pin the sidebar open
|
||||
cy.get('#sidebar-collapse-toggle').click();
|
||||
|
||||
// Click on entry of menu
|
||||
cy.get('#admin-menu-section-edit-title').click();
|
||||
|
||||
cy.get('a[title="menu.section.edit_community"]').click();
|
||||
|
||||
// Analyze <ds-edit-community-selector> for accessibility
|
||||
testA11y('ds-edit-community-selector');
|
||||
});
|
||||
|
||||
it('Edit Collection modal should pass accessibility tests', () => {
|
||||
// Pin the sidebar open
|
||||
cy.get('#sidebar-collapse-toggle').click();
|
||||
|
||||
// Click on entry of menu
|
||||
cy.get('#admin-menu-section-edit-title').click();
|
||||
|
||||
cy.get('a[title="menu.section.edit_collection"]').click();
|
||||
|
||||
// Analyze <ds-edit-collection-selector> for accessibility
|
||||
testA11y('ds-edit-collection-selector');
|
||||
});
|
||||
|
||||
it('Edit Item modal should pass accessibility tests', () => {
|
||||
// Pin the sidebar open
|
||||
cy.get('#sidebar-collapse-toggle').click();
|
||||
|
||||
// Click on entry of menu
|
||||
cy.get('#admin-menu-section-edit-title').click();
|
||||
|
||||
cy.get('a[title="menu.section.edit_item"]').click();
|
||||
|
||||
// Analyze <ds-edit-item-selector> for accessibility
|
||||
testA11y('ds-edit-item-selector');
|
||||
});
|
||||
});
|
35
cypress/e2e/admin-export-modals.cy.ts
Normal file
35
cypress/e2e/admin-export-modals.cy.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
|
||||
describe('Admin Export Modals', () => {
|
||||
beforeEach(() => {
|
||||
// Must login as an Admin for sidebar to appear
|
||||
cy.visit('/login');
|
||||
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
|
||||
});
|
||||
|
||||
it('Export metadata modal should pass accessibility tests', () => {
|
||||
// Pin the sidebar open
|
||||
cy.get('#sidebar-collapse-toggle').click();
|
||||
|
||||
// Click on entry of menu
|
||||
cy.get('#admin-menu-section-export-title').click();
|
||||
|
||||
cy.get('a[title="menu.section.export_metadata"]').click();
|
||||
|
||||
// Analyze <ds-export-metadata-selector> for accessibility
|
||||
testA11y('ds-export-metadata-selector');
|
||||
});
|
||||
|
||||
it('Export batch modal should pass accessibility tests', () => {
|
||||
// Pin the sidebar open
|
||||
cy.get('#sidebar-collapse-toggle').click();
|
||||
|
||||
// Click on entry of menu
|
||||
cy.get('#admin-menu-section-export-title').click();
|
||||
|
||||
cy.get('a[title="menu.section.export_batch"]').click();
|
||||
|
||||
// Analyze <ds-export-batch-selector> for accessibility
|
||||
testA11y('ds-export-batch-selector');
|
||||
});
|
||||
});
|
18
cypress/e2e/admin-workflow-page.cy.ts
Normal file
18
cypress/e2e/admin-workflow-page.cy.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
|
||||
describe('Admin Workflow Page', () => {
|
||||
beforeEach(() => {
|
||||
// Must login as an Admin to see the page
|
||||
cy.visit('/admin/workflow');
|
||||
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-workflow-page').should('be.visible');
|
||||
// At least one search result should be displayed
|
||||
cy.get('[data-test="list-object"]').should('be.visible');
|
||||
// Analyze <ds-admin-workflow-page> for accessibility issues
|
||||
testA11y('ds-admin-workflow-page');
|
||||
});
|
||||
});
|
13
cypress/e2e/end-user-agreement.cy.ts
Normal file
13
cypress/e2e/end-user-agreement.cy.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
|
||||
describe('End User Agreement', () => {
|
||||
it('should pass accessibility tests', () => {
|
||||
cy.visit('/info/end-user-agreement');
|
||||
|
||||
// Page must first be visible
|
||||
cy.get('ds-end-user-agreement').should('be.visible');
|
||||
|
||||
// Analyze <ds-end-user-agreement> for accessibility
|
||||
testA11y('ds-end-user-agreement');
|
||||
});
|
||||
});
|
13
cypress/e2e/feedback.cy.ts
Normal file
13
cypress/e2e/feedback.cy.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
|
||||
describe('Feedback', () => {
|
||||
it('should pass accessibility tests', () => {
|
||||
cy.visit('/info/feedback');
|
||||
|
||||
// Page must first be visible
|
||||
cy.get('ds-feedback').should('be.visible');
|
||||
|
||||
// Analyze <ds-feedback> for accessibility
|
||||
testA11y('ds-feedback');
|
||||
});
|
||||
});
|
13
cypress/e2e/privacy.cy.ts
Normal file
13
cypress/e2e/privacy.cy.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
|
||||
describe('Privacy', () => {
|
||||
it('should pass accessibility tests', () => {
|
||||
cy.visit('/info/privacy');
|
||||
|
||||
// Page must first be visible
|
||||
cy.get('ds-privacy').should('be.visible');
|
||||
|
||||
// Analyze <ds-privacy> for accessibility
|
||||
testA11y('ds-privacy');
|
||||
});
|
||||
});
|
16
cypress/e2e/profile-page.cy.ts
Normal file
16
cypress/e2e/profile-page.cy.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
|
||||
describe('Profile page', () => {
|
||||
beforeEach(() => {
|
||||
// Must login as an Admin to see the page
|
||||
cy.visit('/profile');
|
||||
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
|
||||
});
|
||||
|
||||
it('should pass accessibility tests', () => {
|
||||
// Process form must first be visible
|
||||
cy.get('ds-profile-page').should('be.visible');
|
||||
// Analyze <ds-profile-page> for accessibility issues
|
||||
testA11y('ds-profile-page');
|
||||
});
|
||||
});
|
16
cypress/e2e/system-wide-alert.cy.ts
Normal file
16
cypress/e2e/system-wide-alert.cy.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { testA11y } from 'cypress/support/utils';
|
||||
|
||||
describe('System Wide Alert', () => {
|
||||
beforeEach(() => {
|
||||
// Must login as an Admin to see the page
|
||||
cy.visit('/admin/system-wide-alert');
|
||||
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-system-wide-alert-form').should('be.visible');
|
||||
// Analyze <ds-system-wide-alert-form> for accessibility issues
|
||||
testA11y('ds-system-wide-alert-form');
|
||||
});
|
||||
});
|
@@ -63,7 +63,7 @@
|
||||
<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>
|
||||
|
||||
<h2>Privacy policy</h2>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<h2>Term and termination</h2>
|
||||
@@ -92,4 +92,4 @@
|
||||
<h2>Miscellaneous</h2>
|
||||
<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>
|
||||
|
||||
<p><a [routerLink]="'.'" fragment="ref-a" id="comment-a">[a]</a> 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>
|
||||
<p><a class="link-contrast" [routerLink]="'.'" fragment="ref-a" id="comment-a">[a]</a> 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>
|
||||
|
@@ -83,9 +83,9 @@
|
||||
<p>We may also disclose your personal information:</p>
|
||||
<ul>
|
||||
<li>To comply with any court order, law, or legal process, including to respond to any government or regulatory request.</li>
|
||||
<li>To enforce or apply our <a [routerLink]="['/info/end-user-agreement']" target="_blank" rel="noopener noreferrer">End User Agreement</a> and other agreements, including for billing and collection purposes.</li>
|
||||
<li>To enforce or apply our <a class="link-contrast" [routerLink]="['/info/end-user-agreement']" target="_blank" rel="noopener noreferrer">End User Agreement</a> and other agreements, including for billing and collection purposes.</li>
|
||||
<li>If we believe disclosure is necessary or appropriate to protect the rights, property, or safety of the Company, our customers, or others.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Changes to our privacy policy</h2>
|
||||
<p>It is our policy to post any changes we make to our privacy policy on this page. The date the privacy policy was last revised is identified at the top of the page. You are responsible for periodically visiting our Website and this privacy policy to check for any changes.</p>
|
||||
<p>It is our policy to post any changes we make to our privacy policy on this page. The date the privacy policy was last revised is identified at the top of the page. You are responsible for periodically visiting our Website and this privacy policy to check for any changes.</p>
|
||||
|
@@ -31,6 +31,7 @@
|
||||
</button>
|
||||
</ng-container>
|
||||
<button *ngIf="loading"
|
||||
title="{{'loading.default' | translate}}"
|
||||
class="list-group-item list-group-item-action border-0 list-entry">
|
||||
<ds-loading [showMessage]="false"></ds-loading>
|
||||
</button>
|
||||
|
@@ -466,3 +466,11 @@ ngb-accordion {
|
||||
.mt-ncs { margin-top: calc(var(--ds-content-spacing) * -1); }
|
||||
.mb-ncs { margin-bottom: calc(var(--ds-content-spacing) * -1); }
|
||||
.my-ncs { margin-top: calc(var(--ds-content-spacing) * -1); margin-bottom: calc(var(--ds-content-spacing) * -1); }
|
||||
|
||||
|
||||
.link-contrast {
|
||||
// Rules for accessibility to meet minimum contrast and have an identifiable link between other texts
|
||||
color: darken($link-color, 5%);
|
||||
// We use underline to discern link from text as we can't make color lighter on a white bg
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
Reference in New Issue
Block a user