Skip to content

Commit d4aedbb

Browse files
authored
Merge pull request #3613 from atmire/accessibility-settings-main
Accessibility settings page
2 parents 5cdc72d + d1beb28 commit d4aedbb

34 files changed

+1431
-55
lines changed

config/config.example.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,3 +609,8 @@ geospatialMapViewer:
609609
defaultCentrePoint:
610610
lat: 41.015137
611611
lng: 28.979530
612+
613+
# Configuration for storing accessibility settings, used by the AccessibilitySettingsService
614+
accessibility:
615+
# The duration in days after which the accessibility settings cookie expires
616+
cookieExpirationDuration: 7

cypress.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export default defineConfig({
3434
DSPACE_TEST_SUBMIT_PERSON_COLLECTION_NAME: 'People',
3535
// Account used to test basic submission process
3636
DSPACE_TEST_SUBMIT_USER: '[email protected]',
37+
DSPACE_TEST_SUBMIT_USER_UUID: '914955b1-cf2e-4884-8af7-a166aa24cf73',
3738
DSPACE_TEST_SUBMIT_USER_PASSWORD: 'dspace',
3839
// Administrator users group
3940
DSPACE_ADMINISTRATOR_GROUP: 'e59f5659-bff9-451e-b28f-439e7bd467e4'

cypress/e2e/health-page.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ import { Options } from 'cypress-axe';
44

55
beforeEach(() => {
66
// Must login as an Admin to see the page
7+
cy.intercept('GET', '/server/actuator/health').as('status');
8+
cy.intercept('GET', '/server/actuator/info').as('info');
79
cy.visit('/health');
810
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
911
});
1012

1113
describe('Health Page > Status Tab', () => {
1214
it('should pass accessibility tests', () => {
13-
cy.intercept('GET', '/server/actuator/health').as('status');
1415
cy.wait('@status');
1516

1617
cy.get('a[data-test="health-page.status-tab"]').click();
@@ -36,7 +37,6 @@ describe('Health Page > Status Tab', () => {
3637

3738
describe('Health Page > Info Tab', () => {
3839
it('should pass accessibility tests', () => {
39-
cy.intercept('GET', '/server/actuator/info').as('info');
4040
cy.wait('@info');
4141

4242
cy.get('a[data-test="health-page.info-tab"]').click();

cypress/support/e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ before(() => {
5656
beforeEach(() => {
5757
// Pre-agree to all Orejime cookies by setting the orejime-anonymous cookie
5858
// This just ensures it doesn't get in the way of matching other objects in the page.
59-
cy.setCookie('orejime-anonymous', '{"authentication":true,"preferences":true,"acknowledgement":true,"google-analytics":true,"correlation-id":true}');
59+
cy.setCookie('orejime-anonymous', '{"authentication":true,"preferences":true,"acknowledgement":true,"google-analytics":true,"correlation-id":true,"accessibility":true}');
6060

6161
// Remove any CSRF cookies saved from prior tests
6262
cy.clearCookie(DSPACE_XSRF_COOKIE);
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Config } from '../../config/config.interface';
2+
3+
/**
4+
* Configuration interface used by the AccessibilitySettingsService
5+
*/
6+
export class AccessibilitySettingsConfig implements Config {
7+
/**
8+
* The duration in days after which the accessibility settings cookie expires
9+
*/
10+
cookieExpirationDuration: number;
11+
}

0 commit comments

Comments
 (0)