Skip to content

Commit 888459c

Browse files
committed
Merge remote-tracking branch 'dspace/main' into accessibility-settings-main
# Conflicts: # src/app/profile-page/profile-page.component.html # src/app/profile-page/profile-page.component.ts # src/app/shared/notifications/notifications-board/notifications-board.component.spec.ts # src/app/shared/notifications/notifications-board/notifications-board.component.ts # src/themes/custom/app/profile-page/profile-page.component.ts
2 parents f0ff625 + c7ae1d6 commit 888459c

File tree

259 files changed

+10471
-4151
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

259 files changed

+10471
-4151
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ name: Build
77
on: [push, pull_request]
88

99
permissions:
10-
contents: read # to fetch code (actions/checkout)
10+
contents: read # to fetch code (actions/checkout)
11+
packages: read # to fetch private images from GitHub Container Registry (GHCR)
1112

1213
jobs:
1314
tests:
@@ -35,6 +36,9 @@ jobs:
3536
NODE_OPTIONS: '--max-old-space-size=4096'
3637
# Project name to use when running "docker compose" prior to e2e tests
3738
COMPOSE_PROJECT_NAME: 'ci'
39+
# Docker Registry to use for Docker compose scripts below.
40+
# We use GitHub's Container Registry to avoid aggressive rate limits at DockerHub.
41+
DOCKER_REGISTRY: ghcr.io
3842
strategy:
3943
# Create a matrix of Node versions to test against (in parallel)
4044
matrix:
@@ -114,6 +118,14 @@ jobs:
114118
path: 'coverage/dspace-angular/lcov.info'
115119
retention-days: 14
116120

121+
# Login to our Docker registry, so that we can access private Docker images using "docker compose" below.
122+
- name: Login to ${{ env.DOCKER_REGISTRY }}
123+
uses: docker/login-action@v3
124+
with:
125+
registry: ${{ env.DOCKER_REGISTRY }}
126+
username: ${{ github.repository_owner }}
127+
password: ${{ secrets.GITHUB_TOKEN }}
128+
117129
# Using "docker compose" start backend using CI configuration
118130
# and load assetstore from a cached copy
119131
- name: Start DSpace REST Backend via Docker (for e2e tests)

.github/workflows/docker.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ on:
1616
pull_request:
1717

1818
permissions:
19-
contents: read # to fetch code (actions/checkout)
19+
contents: read # to fetch code (actions/checkout)
20+
packages: write # to write images to GitHub Container Registry (GHCR)
2021

2122
jobs:
2223
#############################################################

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This image will be published as dspace/dspace-angular
22
# See https://github.com/DSpace/dspace-angular/tree/main/docker for usage details
33

4-
FROM node:18-alpine
4+
FROM docker.io/node:18-alpine
55

66
# Ensure Python and other build tools are available
77
# These are needed to install some node modules, especially on linux/arm64
@@ -22,5 +22,5 @@ ENV NODE_OPTIONS="--max_old_space_size=4096"
2222
# Listen / accept connections from all IP addresses.
2323
# NOTE: At this time it is only possible to run Docker container in Production mode
2424
# if you have a public URL. See https://github.com/DSpace/dspace-angular/issues/1485
25-
ENV NODE_ENV development
25+
ENV NODE_ENV=development
2626
CMD npm run serve -- --host 0.0.0.0

Dockerfile.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Test build:
55
# docker build -f Dockerfile.dist -t dspace/dspace-angular:latest-dist .
66

7-
FROM node:18-alpine AS build
7+
FROM docker.io/node:18-alpine AS build
88

99
# Ensure Python and other build tools are available
1010
# These are needed to install some node modules, especially on linux/arm64
@@ -26,6 +26,6 @@ COPY --chown=node:node docker/dspace-ui.json /app/dspace-ui.json
2626

2727
WORKDIR /app
2828
USER node
29-
ENV NODE_ENV production
29+
ENV NODE_ENV=production
3030
EXPOSE 4000
3131
CMD pm2-runtime start dspace-ui.json --json

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace
3535
Quick start
3636
-----------
3737

38-
**Ensure you're running [Node](https://nodejs.org) `v16.x` or `v18.x`, [npm](https://www.npmjs.com/) >= `v5.x`**
38+
**Ensure you're running [Node](https://nodejs.org) `v18.x` or `v20.x`, [npm](https://www.npmjs.com/) >= `v10.x`**
3939

4040
```bash
4141
# clone the repo
@@ -90,7 +90,7 @@ Requirements
9090
------------
9191

9292
- [Node.js](https://nodejs.org)
93-
- Ensure you're running node `v16.x` or `v18.x`
93+
- Ensure you're running node `v18.x` or `v20.x`
9494

9595
If you have [`nvm`](https://github.com/creationix/nvm#install-script) or [`nvm-windows`](https://github.com/coreybutler/nvm-windows) installed, which is highly recommended, you can run `nvm install --lts && nvm use` to install and start using the latest Node LTS.
9696

config/config.example.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# NOTE: will log all redux actions and transfers in console
22
debug: false
33

4-
# Angular Universal server settings
4+
# Angular User Inteface settings
55
# NOTE: these settings define where Node.js will start your UI application. Therefore, these
66
# "ui" settings usually specify a localhost port/URL which is later proxied to a public URL (using Apache or similar)
77
ui:
@@ -17,12 +17,14 @@ ui:
1717
# Trust X-FORWARDED-* headers from proxies (default = true)
1818
useProxies: true
1919

20-
universal:
21-
# Whether to inline "critical" styles into the server-side rendered HTML.
22-
# Determining which styles are critical is a relatively expensive operation;
23-
# this option can be disabled to boost server performance at the expense of
24-
# loading smoothness.
25-
inlineCriticalCss: true
20+
# Angular Server Side Rendering (SSR) settings
21+
ssr:
22+
# Whether to tell Angular to inline "critical" styles into the server-side rendered HTML.
23+
# Determining which styles are critical is a relatively expensive operation; this option is
24+
# disabled (false) by default to boost server performance at the expense of loading smoothness.
25+
inlineCriticalCss: false
26+
# Path prefixes to enable SSR for. By default these are limited to paths of primary DSpace objects.
27+
paths: [ '/home', '/items/', '/entities/', '/collections/', '/communities/', '/bitstream/', '/bitstreams/', '/handle/' ]
2628

2729
# The REST API server settings
2830
# NOTE: these settings define which (publicly available) REST API to use. They are usually

cypress/e2e/admin-add-new-modals.cy.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ describe('Admin Add New Modals', () => {
99

1010
it('Add new Community modal should pass accessibility tests', () => {
1111
// Pin the sidebar open
12-
cy.get('#sidebar-collapse-toggle').click();
12+
cy.get('[data-test="sidebar-collapse-toggle"]').trigger('mouseover');
13+
cy.get('[data-test="sidebar-collapse-toggle"]').click();
1314

1415
// Click on entry of menu
15-
cy.get('#admin-menu-section-new-title').click();
16+
cy.get('[data-test="admin-menu-section-new-title"]').should('be.visible');
17+
cy.get('[data-test="admin-menu-section-new-title"]').click();
1618

1719
cy.get('a[data-test="menu.section.new_community"]').click();
1820

@@ -22,10 +24,12 @@ describe('Admin Add New Modals', () => {
2224

2325
it('Add new Collection modal should pass accessibility tests', () => {
2426
// Pin the sidebar open
25-
cy.get('#sidebar-collapse-toggle').click();
27+
cy.get('[data-test="sidebar-collapse-toggle"]').trigger('mouseover');
28+
cy.get('[data-test="sidebar-collapse-toggle"]').click();
2629

2730
// Click on entry of menu
28-
cy.get('#admin-menu-section-new-title').click();
31+
cy.get('[data-test="admin-menu-section-new-title"]').should('be.visible');
32+
cy.get('[data-test="admin-menu-section-new-title"]').click();
2933

3034
cy.get('a[data-test="menu.section.new_collection"]').click();
3135

@@ -35,10 +39,12 @@ describe('Admin Add New Modals', () => {
3539

3640
it('Add new Item modal should pass accessibility tests', () => {
3741
// Pin the sidebar open
38-
cy.get('#sidebar-collapse-toggle').click();
42+
cy.get('[data-test="sidebar-collapse-toggle"]').trigger('mouseover');
43+
cy.get('[data-test="sidebar-collapse-toggle"]').click();
3944

4045
// Click on entry of menu
41-
cy.get('#admin-menu-section-new-title').click();
46+
cy.get('[data-test="admin-menu-section-new-title"]').should('be.visible');
47+
cy.get('[data-test="admin-menu-section-new-title"]').click();
4248

4349
cy.get('a[data-test="menu.section.new_item"]').click();
4450

cypress/e2e/admin-edit-modals.cy.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ describe('Admin Edit Modals', () => {
99

1010
it('Edit Community modal should pass accessibility tests', () => {
1111
// Pin the sidebar open
12-
cy.get('#sidebar-collapse-toggle').click();
12+
cy.get('[data-test="sidebar-collapse-toggle"]').trigger('mouseover');
13+
cy.get('[data-test="sidebar-collapse-toggle"]').click();
1314

1415
// Click on entry of menu
15-
cy.get('#admin-menu-section-edit-title').click();
16+
cy.get('[data-test="admin-menu-section-edit-title"]').should('be.visible');
17+
cy.get('[data-test="admin-menu-section-edit-title"]').click();
1618

1719
cy.get('a[data-test="menu.section.edit_community"]').click();
1820

@@ -22,10 +24,12 @@ describe('Admin Edit Modals', () => {
2224

2325
it('Edit Collection modal should pass accessibility tests', () => {
2426
// Pin the sidebar open
25-
cy.get('#sidebar-collapse-toggle').click();
27+
cy.get('[data-test="sidebar-collapse-toggle"]').trigger('mouseover');
28+
cy.get('[data-test="sidebar-collapse-toggle"]').click();
2629

2730
// Click on entry of menu
28-
cy.get('#admin-menu-section-edit-title').click();
31+
cy.get('[data-test="admin-menu-section-edit-title"]').should('be.visible');
32+
cy.get('[data-test="admin-menu-section-edit-title"]').click();
2933

3034
cy.get('a[data-test="menu.section.edit_collection"]').click();
3135

@@ -35,10 +39,12 @@ describe('Admin Edit Modals', () => {
3539

3640
it('Edit Item modal should pass accessibility tests', () => {
3741
// Pin the sidebar open
38-
cy.get('#sidebar-collapse-toggle').click();
42+
cy.get('[data-test="sidebar-collapse-toggle"]').trigger('mouseover');
43+
cy.get('[data-test="sidebar-collapse-toggle"]').click();
3944

4045
// Click on entry of menu
41-
cy.get('#admin-menu-section-edit-title').click();
46+
cy.get('[data-test="admin-menu-section-edit-title"]').should('be.visible');
47+
cy.get('[data-test="admin-menu-section-edit-title"]').click();
4248

4349
cy.get('a[data-test="menu.section.edit_item"]').click();
4450

cypress/e2e/admin-export-modals.cy.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ describe('Admin Export Modals', () => {
99

1010
it('Export metadata modal should pass accessibility tests', () => {
1111
// Pin the sidebar open
12-
cy.get('#sidebar-collapse-toggle').click();
12+
cy.get('[data-test="sidebar-collapse-toggle"]').trigger('mouseover');
13+
cy.get('[data-test="sidebar-collapse-toggle"]').click();
1314

1415
// Click on entry of menu
15-
cy.get('#admin-menu-section-export-title').click();
16+
cy.get('[data-test="admin-menu-section-export-title"]').should('be.visible');
17+
cy.get('[data-test="admin-menu-section-export-title"]').click();
1618

1719
cy.get('a[data-test="menu.section.export_metadata"]').click();
1820

@@ -22,10 +24,12 @@ describe('Admin Export Modals', () => {
2224

2325
it('Export batch modal should pass accessibility tests', () => {
2426
// Pin the sidebar open
25-
cy.get('#sidebar-collapse-toggle').click();
27+
cy.get('[data-test="sidebar-collapse-toggle"]').trigger('mouseover');
28+
cy.get('[data-test="sidebar-collapse-toggle"]').click();
2629

2730
// Click on entry of menu
28-
cy.get('#admin-menu-section-export-title').click();
31+
cy.get('[data-test="admin-menu-section-export-title"]').should('be.visible');
32+
cy.get('[data-test="admin-menu-section-export-title"]').click();
2933

3034
cy.get('a[data-test="menu.section.export_batch"]').click();
3135

cypress/e2e/admin-sidebar.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe('Admin Sidebar', () => {
1010

1111
it('should be pinnable and pass accessibility tests', () => {
1212
// Pin the sidebar open
13-
cy.get('#sidebar-collapse-toggle').click();
13+
cy.get('[data-test="sidebar-collapse-toggle"]').click();
1414

1515
// Click on every expandable section to open all menus
1616
cy.get('ds-expandable-admin-sidebar-section').click({ multiple: true });

cypress/e2e/item-edit.cy.ts

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,15 @@ beforeEach(() => {
99

1010
// This page is restricted, so we will be shown the login form. Fill it out & submit.
1111
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
12-
13-
// We need to wait for the correction types allowed for the item to be loaded to be sure that each tab is fully loaded.
14-
// This because the edit item page causes often tests to fails due to timeout.
15-
cy.intercept('GET', 'server/api/config/correctiontypes/search/findByItem*').as('correctionTypes');
16-
cy.wait('@correctionTypes');
1712
});
1813

1914
describe('Edit Item > Edit Metadata tab', () => {
2015
it('should pass accessibility tests', () => {
16+
cy.get('a[data-test="metadata"]').should('be.visible');
2117
cy.get('a[data-test="metadata"]').click();
2218

23-
// Our selected tab should be active
19+
// Our selected tab should be both visible & active
20+
cy.get('a[data-test="metadata"]').should('be.visible');
2421
cy.get('a[data-test="metadata"]').should('have.class', 'active');
2522

2623
// <ds-edit-item-page> tag must be loaded
@@ -39,9 +36,11 @@ describe('Edit Item > Edit Metadata tab', () => {
3936
describe('Edit Item > Status tab', () => {
4037

4138
it('should pass accessibility tests', () => {
39+
cy.get('a[data-test="status"]').should('be.visible');
4240
cy.get('a[data-test="status"]').click();
4341

44-
// Our selected tab should be active
42+
// Our selected tab should be both visible & active
43+
cy.get('a[data-test="status"]').should('be.visible');
4544
cy.get('a[data-test="status"]').should('have.class', 'active');
4645

4746
// <ds-item-status> tag must be loaded
@@ -55,9 +54,11 @@ describe('Edit Item > Status tab', () => {
5554
describe('Edit Item > Bitstreams tab', () => {
5655

5756
it('should pass accessibility tests', () => {
57+
cy.get('a[data-test="bitstreams"]').should('be.visible');
5858
cy.get('a[data-test="bitstreams"]').click();
5959

60-
// Our selected tab should be active
60+
// Our selected tab should be both visible & active
61+
cy.get('a[data-test="bitstreams"]').should('be.visible');
6162
cy.get('a[data-test="bitstreams"]').should('have.class', 'active');
6263

6364
// <ds-item-bitstreams> tag must be loaded
@@ -82,9 +83,11 @@ describe('Edit Item > Bitstreams tab', () => {
8283
describe('Edit Item > Curate tab', () => {
8384

8485
it('should pass accessibility tests', () => {
86+
cy.get('a[data-test="curate"]').should('be.visible');
8587
cy.get('a[data-test="curate"]').click();
8688

87-
// Our selected tab should be active
89+
// Our selected tab should be both visible & active
90+
cy.get('a[data-test="curate"]').should('be.visible');
8891
cy.get('a[data-test="curate"]').should('have.class', 'active');
8992

9093
// <ds-item-curate> tag must be loaded
@@ -98,9 +101,11 @@ describe('Edit Item > Curate tab', () => {
98101
describe('Edit Item > Relationships tab', () => {
99102

100103
it('should pass accessibility tests', () => {
104+
cy.get('a[data-test="relationships"]').should('be.visible');
101105
cy.get('a[data-test="relationships"]').click();
102106

103-
// Our selected tab should be active
107+
// Our selected tab should be both visible & active
108+
cy.get('a[data-test="relationships"]').should('be.visible');
104109
cy.get('a[data-test="relationships"]').should('have.class', 'active');
105110

106111
// <ds-item-relationships> tag must be loaded
@@ -114,9 +119,11 @@ describe('Edit Item > Relationships tab', () => {
114119
describe('Edit Item > Version History tab', () => {
115120

116121
it('should pass accessibility tests', () => {
122+
cy.get('a[data-test="versionhistory"]').should('be.visible');
117123
cy.get('a[data-test="versionhistory"]').click();
118124

119-
// Our selected tab should be active
125+
// Our selected tab should be both visible & active
126+
cy.get('a[data-test="versionhistory"]').should('be.visible');
120127
cy.get('a[data-test="versionhistory"]').should('have.class', 'active');
121128

122129
// <ds-item-version-history> tag must be loaded
@@ -130,9 +137,11 @@ describe('Edit Item > Version History tab', () => {
130137
describe('Edit Item > Access Control tab', () => {
131138

132139
it('should pass accessibility tests', () => {
140+
cy.get('a[data-test="access-control"]').should('be.visible');
133141
cy.get('a[data-test="access-control"]').click();
134142

135-
// Our selected tab should be active
143+
// Our selected tab should be both visible & active
144+
cy.get('a[data-test="access-control"]').should('be.visible');
136145
cy.get('a[data-test="access-control"]').should('have.class', 'active');
137146

138147
// <ds-item-access-control> tag must be loaded
@@ -146,9 +155,11 @@ describe('Edit Item > Access Control tab', () => {
146155
describe('Edit Item > Collection Mapper tab', () => {
147156

148157
it('should pass accessibility tests', () => {
158+
cy.get('a[data-test="mapper"]').should('be.visible');
149159
cy.get('a[data-test="mapper"]').click();
150160

151-
// Our selected tab should be active
161+
// Our selected tab should be both visible & active
162+
cy.get('a[data-test="mapper"]').should('be.visible');
152163
cy.get('a[data-test="mapper"]').should('have.class', 'active');
153164

154165
// <ds-item-collection-mapper> tag must be loaded

cypress/support/e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ before(() => {
5454

5555
// Runs once before the first test in each "block"
5656
beforeEach(() => {
57-
// Pre-agree to all Klaro cookies by setting the klaro-anonymous cookie
57+
// 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('klaro-anonymous', '{%22authentication%22:true%2C%22preferences%22:true%2C%22acknowledgement%22:true%2C%22google-analytics%22:true%2C%22google-recaptcha%22:true}');
59+
cy.setCookie('orejime-anonymous', '{"authentication":true,"preferences":true,"acknowledgement":true,"google-analytics":true}');
6060

6161
// Remove any CSRF cookies saved from prior tests
6262
cy.clearCookie(DSPACE_XSRF_COOKIE);

docker/cli.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ networks:
2121
external: true
2222
services:
2323
dspace-cli:
24-
image: "${DOCKER_OWNER:-dspace}/dspace-cli:${DSPACE_VER:-latest}"
24+
image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_OWNER:-dspace}/dspace-cli:${DSPACE_VER:-latest}"
2525
container_name: dspace-cli
2626
environment:
2727
# Below syntax may look odd, but it is how to override dspace.cfg settings via env variables.

docker/db.entities.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# # Therefore, it should be kept in sync with that file
1515
services:
1616
dspacedb:
17-
image: "${DOCKER_OWNER:-dspace}/dspace-postgres-pgcrypto:${DSPACE_VER:-latest}-loadsql"
17+
image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_OWNER:-dspace}/dspace-postgres-pgcrypto:${DSPACE_VER:-latest}-loadsql"
1818
environment:
1919
# This LOADSQL should be kept in sync with the URL in DSpace/DSpace
2020
# This SQL is available from https://github.com/DSpace-Labs/AIP-Files/releases/tag/demo-entities-data

0 commit comments

Comments
 (0)