Skip to content

Commit c821c76

Browse files
authored
Merge branch 'DSpace:main' into main
2 parents c8694e1 + c7ae1d6 commit c821c76

File tree

154 files changed

+7069
-2143
lines changed

Some content is hidden

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

154 files changed

+7069
-2143
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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ ssr:
2323
# Determining which styles are critical is a relatively expensive operation; this option is
2424
# disabled (false) by default to boost server performance at the expense of loading smoothness.
2525
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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ describe('Admin Add New Modals', () => {
99

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

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

1719
cy.get('a[data-test="menu.section.new_community"]').click();
@@ -22,9 +24,11 @@ describe('Admin Add New Modals', () => {
2224

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

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

3034
cy.get('a[data-test="menu.section.new_collection"]').click();
@@ -35,9 +39,11 @@ describe('Admin Add New Modals', () => {
3539

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

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

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

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

Lines changed: 9 additions & 3 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('[data-test="sidebar-collapse-toggle"]').trigger('mouseover');
1213
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
27+
cy.get('[data-test="sidebar-collapse-toggle"]').trigger('mouseover');
2528
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
42+
cy.get('[data-test="sidebar-collapse-toggle"]').trigger('mouseover');
3843
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: 6 additions & 2 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('[data-test="sidebar-collapse-toggle"]').trigger('mouseover');
1213
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
27+
cy.get('[data-test="sidebar-collapse-toggle"]').trigger('mouseover');
2528
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/item-edit.cy.ts

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

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

18-
// 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');
1921
cy.get('a[data-test="metadata"]').should('have.class', 'active');
2022

2123
// <ds-edit-item-page> tag must be loaded
@@ -34,9 +36,11 @@ describe('Edit Item > Edit Metadata tab', () => {
3436
describe('Edit Item > Status tab', () => {
3537

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

39-
// 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');
4044
cy.get('a[data-test="status"]').should('have.class', 'active');
4145

4246
// <ds-item-status> tag must be loaded
@@ -50,9 +54,11 @@ describe('Edit Item > Status tab', () => {
5054
describe('Edit Item > Bitstreams tab', () => {
5155

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

55-
// 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');
5662
cy.get('a[data-test="bitstreams"]').should('have.class', 'active');
5763

5864
// <ds-item-bitstreams> tag must be loaded
@@ -77,9 +83,11 @@ describe('Edit Item > Bitstreams tab', () => {
7783
describe('Edit Item > Curate tab', () => {
7884

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

82-
// 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');
8391
cy.get('a[data-test="curate"]').should('have.class', 'active');
8492

8593
// <ds-item-curate> tag must be loaded
@@ -93,9 +101,11 @@ describe('Edit Item > Curate tab', () => {
93101
describe('Edit Item > Relationships tab', () => {
94102

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

98-
// 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');
99109
cy.get('a[data-test="relationships"]').should('have.class', 'active');
100110

101111
// <ds-item-relationships> tag must be loaded
@@ -109,9 +119,11 @@ describe('Edit Item > Relationships tab', () => {
109119
describe('Edit Item > Version History tab', () => {
110120

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

114-
// 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');
115127
cy.get('a[data-test="versionhistory"]').should('have.class', 'active');
116128

117129
// <ds-item-version-history> tag must be loaded
@@ -125,9 +137,11 @@ describe('Edit Item > Version History tab', () => {
125137
describe('Edit Item > Access Control tab', () => {
126138

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

130-
// 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');
131145
cy.get('a[data-test="access-control"]').should('have.class', 'active');
132146

133147
// <ds-item-access-control> tag must be loaded
@@ -141,9 +155,11 @@ describe('Edit Item > Access Control tab', () => {
141155
describe('Edit Item > Collection Mapper tab', () => {
142156

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

146-
// 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');
147163
cy.get('a[data-test="mapper"]').should('have.class', 'active');
148164

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

0 commit comments

Comments
 (0)