Skip to content

Commit c49d80b

Browse files
committed
[DSC-2185] Merge tag 'dspace-8.1' into task/main-cris/DSC-2185
# Conflicts: # .github/workflows/docker.yml # angular.json # config/config.example.yml # cypress/e2e/breadcrumbs.cy.ts # cypress/e2e/collection-statistics.cy.ts # cypress/e2e/community-statistics.cy.ts # cypress/e2e/header.cy.ts # cypress/e2e/homepage-statistics.cy.ts # cypress/e2e/item-page.cy.ts # cypress/e2e/item-statistics.cy.ts # cypress/e2e/login-modal.cy.ts # docker/docker-compose-ci.yml # docker/docker-compose-rest.yml # package.json # server.ts # src/app/access-control/bulk-access/bulk-access.component.html # src/app/access-control/bulk-access/bulk-access.component.ts # src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts # src/app/access-control/group-registry/group-form/group-form.component.spec.ts # src/app/access-control/group-registry/group-form/members-list/members-list.component.ts # src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.html # src/app/admin/admin-registries/metadata-registry/metadata-registry.component.ts # src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.html # src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts # src/app/admin/admin-registries/metadata-schema/metadata-schema.component.ts # src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.ts # src/app/app.component.ts # src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts # src/app/bitstream-page/legacy-bitstream-url-redirect.guard.ts # src/app/browse-by/browse-by-date/browse-by-date.component.ts # src/app/browse-by/browse-by-metadata/browse-by-metadata.component.ts # src/app/collection-page/edit-item-template-page/edit-item-template-page.component.html # src/app/core/browse/browse.service.ts # src/app/core/config/models/config-submission-section.model.ts # src/app/core/dspace-rest/dspace-rest.interceptor.ts # src/app/core/eperson/eperson-data.service.ts # src/app/core/provide-core.ts # src/app/core/services/server-hard-redirect.service.spec.ts # src/app/core/shared/client-math.service.ts # src/app/core/shared/search/search-filter.service.ts # src/app/core/submission/workspaceitem-data.service.ts # src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-value/dso-edit-metadata-value.component.html # src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-value/dso-edit-metadata-value.component.ts # src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.spec.ts # src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-issue/journal-issue-search-result-list-element.component.html # src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal/journal-search-result-list-element.component.html # src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/project/project-search-result-list-element.component.html # src/app/info/end-user-agreement/end-user-agreement-content/end-user-agreement-content.component.html # src/app/info/end-user-agreement/end-user-agreement.component.ts # src/app/info/feedback/feedback-form/feedback-form.component.spec.ts # src/app/item-page/alerts/item-alerts.component.html # src/app/item-page/alerts/item-alerts.component.spec.ts # src/app/item-page/alerts/item-alerts.component.ts # src/app/item-page/edit-item-page/edit-item-page.component.html # src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.spec.ts # src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.html # src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.html # src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.spec.ts # src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.ts # src/app/item-page/field-components/metadata-uri-values/metadata-uri-values.component.html # src/app/item-page/full/full-item-page.component.ts # src/app/item-page/item-page-routes.ts # src/app/item-page/item-page.resolver.ts # src/app/item-page/item.resolver.ts # src/app/item-page/orcid-page/orcid-sync-settings/orcid-sync-settings.component.ts # src/app/item-page/simple/field-components/specific-field/item-page-field.component.ts # src/app/item-page/simple/item-page.component.spec.ts # src/app/item-page/simple/item-types/shared/item-relationships-utils.ts # src/app/item-page/versions/item-versions.component.html # src/app/item-page/versions/item-versions.component.ts # src/app/login-page/login-page.component.spec.ts # src/app/menu-resolver.service.ts # src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-external-dropdown/my-dspace-new-external-dropdown.component.html # src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission-dropdown/my-dspace-new-submission-dropdown.component.html # src/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts # src/app/notifications/suggestion-targets/suggestion-targets.effects.ts # src/app/profile-page/profile-page-researcher-form/profile-page-researcher-form.component.ts # src/app/profile-page/profile-page.component.html # src/app/profile-page/profile-page.component.ts # src/app/register-page/create-profile/create-profile.component.ts # src/app/search-page/configuration-search-page.component.ts # src/app/shared/access-control-form-container/access-control-form-container.component.html # src/app/shared/access-control-form-container/access-control-form-container.component.ts # src/app/shared/auth-nav-menu/auth-nav-menu.component.html # src/app/shared/auth-nav-menu/auth-nav-menu.component.spec.ts # src/app/shared/auth-nav-menu/user-menu/user-menu.component.html # src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.html # src/app/shared/comcol/comcol-page-browse-by/comcol-page-browse-by.component.html # src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html # src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.spec.ts # src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts # src/app/shared/file-download-link/file-download-link.component.html # src/app/shared/file-download-link/file-download-link.component.ts # src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts # src/app/shared/form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component.scss # src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker-inline/dynamic-date-picker-inline.component.html # src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.html # src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list.component.ts # src/app/shared/form/builder/ds-dynamic-form-ui/models/lookup/dynamic-lookup.component.spec.ts # src/app/shared/form/builder/ds-dynamic-form-ui/models/lookup/dynamic-lookup.component.ts # src/app/shared/form/builder/ds-dynamic-form-ui/models/onebox/dynamic-onebox.component.ts # src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.component.html # src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.component.spec.ts # src/app/shared/form/builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component.spec.ts # src/app/shared/form/builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component.ts # src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.spec.ts # src/app/shared/form/builder/parsers/concat-field-parser.ts # src/app/shared/form/builder/parsers/date-field-parser.spec.ts # src/app/shared/form/builder/parsers/dropdown-field-parser.ts # src/app/shared/form/builder/parsers/field-parser.ts # src/app/shared/form/builder/parsers/name-field-parser.ts # src/app/shared/form/builder/parsers/parser-factory.ts # src/app/shared/form/builder/parsers/series-field-parser.ts # src/app/shared/form/chips/chips.component.html # src/app/shared/form/chips/chips.component.scss # src/app/shared/form/chips/chips.component.ts # src/app/shared/form/form.component.html # src/app/shared/form/form.component.ts # src/app/shared/form/number-picker/number-picker.component.html # src/app/shared/form/number-picker/number-picker.component.ts # src/app/shared/form/vocabulary-treeview/vocabulary-treeview.component.html # src/app/shared/log-in/methods/password/log-in-password.component.html # src/app/shared/object-list/item-list-element/item-types/item/item-list-element.component.spec.ts # src/app/shared/object-list/my-dspace-result-list-element/item-list-preview/item-list-preview.component.html # src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.ts # src/app/shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.ts # src/app/shared/object-select/item-select/item-select.component.spec.ts # src/app/shared/pagination-drag-and-drop/abstract-paginated-drag-and-drop-list.component.spec.ts # src/app/shared/pagination-drag-and-drop/abstract-paginated-drag-and-drop-list.component.ts # src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.html # src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-option/search-facet-option.component.html # src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-option/search-facet-option.component.ts # src/app/shared/search/search-filters/search-filter/search-facet-filter/search-facet-filter.component.spec.ts # src/app/shared/search/search-filters/search-filter/search-filter.component.ts # src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.spec.ts # src/app/shared/search/search-filters/search-filters.component.html # src/app/shared/search/search-filters/search-filters.component.ts # src/app/shared/search/search-labels/search-label/search-label.component.html # src/app/shared/search/search-labels/search-label/search-label.component.ts # src/app/shared/search/search-results/search-results.component.html # src/app/shared/search/search-results/search-results.component.ts # src/app/shared/search/search-settings/search-settings.component.spec.ts # src/app/shared/search/search.component.html # src/app/shared/search/search.component.spec.ts # src/app/shared/search/search.component.ts # src/app/shared/search/themed-search.component.ts # src/app/shared/sidebar/page-with-sidebar.component.html # src/app/shared/upload/file-dropzone-no-uploader/file-dropzone-no-uploader.scss # src/app/shared/utils/markdown.directive.ts # src/app/submission/edit/submission-edit.component.spec.ts # src/app/submission/form/collection/submission-form-collection.component.html # src/app/submission/form/footer/submission-form-footer.component.html # src/app/submission/form/footer/submission-form-footer.component.spec.ts # src/app/submission/form/submission-form.component.ts # src/app/submission/objects/submission-objects.actions.ts # src/app/submission/objects/submission-objects.effects.spec.ts # src/app/submission/objects/submission-objects.effects.ts # src/app/submission/objects/submission-objects.reducer.spec.ts # src/app/submission/objects/submission-objects.reducer.ts # src/app/submission/objects/submission-section-object.model.ts # src/app/submission/sections/accesses/section-accesses.component.spec.ts # src/app/submission/sections/form/section-form.component.ts # src/app/submission/sections/sections.service.spec.ts # src/app/submission/sections/sections.service.ts # src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.spec.ts # src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.ts # src/app/submission/sections/upload/file/section-upload-file.component.html # src/app/submission/sections/upload/file/section-upload-file.component.ts # src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts # src/app/submission/submission.service.spec.ts # src/app/submission/submission.service.ts # src/app/system-wide-alert/alert-form/system-wide-alert-form.component.html # src/app/system-wide-alert/alert-form/system-wide-alert-form.component.ts # src/app/thumbnail/thumbnail.component.html # src/assets/i18n/ar.json5 # src/assets/i18n/ca.json5 # src/assets/i18n/de.json5 # src/assets/i18n/en.json5 # src/assets/i18n/es.json5 # src/assets/i18n/fr.json5 # src/assets/i18n/hu.json5 # src/assets/i18n/it.json5 # src/assets/i18n/pt-PT.json5 # src/config/app-config.interface.ts # src/config/default-app-config.ts # src/config/server-config.interface.ts # src/environments/environment.test.ts # src/modules/app/browser-init.service.ts # src/modules/app/server-init.service.ts # src/styles/_custom_variables.scss # src/styles/_global-styles.scss # src/themes/custom/app/profile-page/profile-page.component.ts # src/themes/custom/app/register-page/create-profile/create-profile.component.ts # src/themes/custom/app/shared/search/search-results/search-results.component.ts # src/themes/custom/app/submission/sections/upload/file/section-upload-file.component.ts # src/themes/custom/lazy-theme.module.ts # src/themes/dspace/app/header-nav-wrapper/header-navbar-wrapper.component.ts # src/themes/dspace/app/header/header.component.html # src/themes/dspace/styles/_theme_css_variable_overrides.scss # yarn.lock
2 parents 766a988 + b9ff51d commit c49d80b

File tree

589 files changed

+38148
-50266
lines changed

Some content is hidden

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

589 files changed

+38148
-50266
lines changed

.eslintrc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@
165165
"@angular-eslint/no-output-native": "warn",
166166
"@angular-eslint/no-output-on-prefix": "warn",
167167
"@angular-eslint/no-conflicting-lifecycle": "warn",
168+
"@angular-eslint/use-lifecycle-interface": "error",
168169

169170
"@typescript-eslint/no-inferrable-types":[
170171
"error",
@@ -292,7 +293,8 @@
292293
],
293294
"rules": {
294295
// Custom DSpace Angular rules
295-
"dspace-angular-html/themed-component-usages": "error"
296+
"dspace-angular-html/themed-component-usages": "error",
297+
"dspace-angular-html/no-disabled-attribute-on-button": "error"
296298
}
297299
},
298300
{

.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
@@ -24,5 +24,5 @@ ENV NODE_OPTIONS="--max_old_space_size=4096"
2424
# Listen / accept connections from all IP addresses.
2525
# NOTE: At this time it is only possible to run Docker container in Production mode
2626
# if you have a public URL. See https://github.com/DSpace/dspace-angular/issues/1485
27-
ENV NODE_ENV development
27+
ENV NODE_ENV=development
2828
CMD yarn serve --host 0.0.0.0

Dockerfile.dist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# See https://github.com/DSpace/dspace-angular/tree/main/docker for usage details
33

44
# Test build:
5-
# docker build -f Dockerfile.dist -t dspace/dspace-angular:latest-dist .
5+
# docker build -f Dockerfile.dist -t dspace/dspace-angular:dspace-8_x-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
@@ -13,7 +13,7 @@ You can find additional information on the DSpace 7 Angular UI on the [wiki](htt
1313
Quick start
1414
-----------
1515

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

1818
```bash
1919
# clone the repo
@@ -68,7 +68,7 @@ Requirements
6868
------------
6969

7070
- [Node.js](https://nodejs.org) and [yarn](https://yarnpkg.com)
71-
- Ensure you're running node `v16.x` or `v18.x` and yarn == `v1.x`
71+
- Ensure you're running node `v18.x` or `v20.x` and yarn == `v1.x`
7272

7373
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.
7474

angular.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
"ngx-export-as",
3535
"url-parse",
3636
"uuid",
37-
"webfontloader",
3837
"xlsx",
3938
"zone.js"
4039
],

config/config.example.yml

Lines changed: 54 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,37 @@ 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. For improved SSR performance, DSpace defaults this to false (disabled).
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.
2525
inlineCriticalCss: false
26+
# Path prefixes to enable SSR for. By default these are limited to paths of primary DSpace objects.
27+
# NOTE: The "/handle/" path ensures Handle redirects work via SSR. The "/reload/" path ensures
28+
# hard refreshes (e.g. after login) trigger SSR while fully reloading the page.
29+
paths: [ '/home', '/items/', '/entities/', '/collections/', '/communities/', '/bitstream/', '/bitstreams/', '/handle/', '/reload/' ]
30+
# Whether to enable rendering of Search component on SSR.
31+
# If set to true the component will be included in the HTML returned from the server side rendering.
32+
# If set to false the component will not be included in the HTML returned from the server side rendering.
33+
enableSearchComponent: false
34+
# Whether to enable rendering of Browse component on SSR.
35+
# If set to true the component will be included in the HTML returned from the server side rendering.
36+
# If set to false the component will not be included in the HTML returned from the server side rendering.
37+
enableBrowseComponent: false
38+
# Enable state transfer from the server-side application to the client-side application.
39+
# Defaults to true.
40+
# Note: When using an external application cache layer, it's recommended not to transfer the state to avoid caching it.
41+
# Disabling it ensures that dynamic state information is not inadvertently cached, which can improve security and
42+
# ensure that users always use the most up-to-date state.
43+
transferState: true
44+
# When a different REST base URL is used for the server-side application, the generated state contains references to
45+
# REST resources with the internal URL configured. By default, these internal URLs are replaced with public URLs.
46+
# Disable this setting to avoid URL replacement during SSR. In this the state is not transferred to avoid security issues.
47+
replaceRestUrl: true
48+
# Enable request performance profiling data collection and printing the results in the server console.
49+
# Defaults to false. Enabling in production is NOT recommended
50+
#enablePerformanceProfiler: false
2651

2752
# The REST API server settings
2853
# NOTE: these settings define which (publicly available) REST API to use. They are usually
@@ -33,6 +58,9 @@ rest:
3358
port: 443
3459
# NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
3560
nameSpace: /server
61+
# Provide a different REST url to be used during SSR execution. It must contain the whole url including protocol, server port and
62+
# server namespace (uncomment to use it).
63+
#ssrBaseUrl: http://localhost:8080/server
3664

3765
# Caching settings
3866
cache:
@@ -467,7 +495,12 @@ search:
467495
enabled: false
468496
# List of filters to enable in "Advanced Search" dropdown
469497
filter: [ 'title', 'author', 'subject', 'entityType' ]
470-
498+
#
499+
# Number used to render n UI elements called loading skeletons that act as placeholders.
500+
# These elements indicate that some content will be loaded in their stead.
501+
# Since we don't know how many filters will be loaded before we receive a response from the server we use this parameter for the skeletons count.
502+
# e.g. If we set 5 then 5 loading skeletons will be visualized before the actual filters are retrieved.
503+
defaultFiltersCount: 5
471504

472505
# Notify metrics
473506
# Configuration for Notify Admin Dashboard for metrics visualization
@@ -521,6 +554,20 @@ notifyMetrics:
521554
config: 'NOTIFY.outgoing.delivered'
522555
description: 'admin-notify-dashboard.NOTIFY.outgoing.delivered.description'
523556

557+
# Live Region configuration
558+
# Live Region as defined by w3c, https://www.w3.org/TR/wai-aria-1.1/#terms:
559+
# Live regions are perceivable regions of a web page that are typically updated as a
560+
# result of an external event when user focus may be elsewhere.
561+
#
562+
# The DSpace live region is a component present at the bottom of all pages that is invisible by default, but is useful
563+
# for screen readers. Any message pushed to the live region will be announced by the screen reader. These messages
564+
# usually contain information about changes on the page that might not be in focus.
565+
liveRegion:
566+
# The duration after which messages disappear from the live region in milliseconds
567+
messageTimeOutDurationMs: 30000
568+
# The visibility of the live region. Setting this to true is only useful for debugging purposes.
569+
isVisible: false
570+
524571
# CRIS Layout
525572
# Configuration for CRIS Layout
526573
crisLayout:

cypress.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { defineConfig } from 'cypress';
22

33
export default defineConfig({
4+
video: true,
45
videosFolder: 'cypress/videos',
56
screenshotsFolder: 'cypress/screenshots',
67
fixturesFolder: 'cypress/fixtures',
@@ -18,6 +19,7 @@ export default defineConfig({
1819

1920
// Admin account used for administrative tests
2021
DSPACE_TEST_ADMIN_USER: '[email protected]',
22+
DSPACE_TEST_ADMIN_USER_UUID: '335647b6-8a52-4ecb-a8c1-7ebabb199bda',
2123
DSPACE_TEST_ADMIN_PASSWORD: 'dspace',
2224
// Community/collection/publication used for view/edit tests
2325
DSPACE_TEST_COMMUNITY: '0958c910-2037-42a9-81c7-dca80e3892b4',
@@ -33,6 +35,8 @@ export default defineConfig({
3335
// Account used to test basic submission process
3436
DSPACE_TEST_SUBMIT_USER: '[email protected]',
3537
DSPACE_TEST_SUBMIT_USER_PASSWORD: 'dspace',
38+
// Administrator users group
39+
DSPACE_ADMINISTRATOR_GROUP: 'e59f5659-bff9-451e-b28f-439e7bd467e4'
3640
},
3741
e2e: {
3842
// Setup our plugins for e2e tests
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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').trigger('mouseover');
13+
cy.get('#sidebar-collapse-toggle').click();
14+
15+
// Click on entry of menu
16+
cy.get('#admin-menu-section-new-title').should('be.visible');
17+
cy.get('#admin-menu-section-new-title').click();
18+
19+
cy.get('a[data-test="menu.section.new_community"]').click();
20+
21+
// Analyze <ds-create-community-parent-selector> for accessibility
22+
testA11y('ds-create-community-parent-selector');
23+
});
24+
25+
it('Add new Collection modal should pass accessibility tests', () => {
26+
// Pin the sidebar open
27+
cy.get('#sidebar-collapse-toggle').trigger('mouseover');
28+
cy.get('#sidebar-collapse-toggle').click();
29+
30+
// Click on entry of menu
31+
cy.get('#admin-menu-section-new-title').should('be.visible');
32+
cy.get('#admin-menu-section-new-title').click();
33+
34+
cy.get('a[data-test="menu.section.new_collection"]').click();
35+
36+
// Analyze <ds-create-collection-parent-selector> for accessibility
37+
testA11y('ds-create-collection-parent-selector');
38+
});
39+
40+
it('Add new Item modal should pass accessibility tests', () => {
41+
// Pin the sidebar open
42+
cy.get('#sidebar-collapse-toggle').trigger('mouseover');
43+
cy.get('#sidebar-collapse-toggle').click();
44+
45+
// Click on entry of menu
46+
cy.get('#admin-menu-section-new-title').should('be.visible');
47+
cy.get('#admin-menu-section-new-title').click();
48+
49+
cy.get('a[data-test="menu.section.new_item"]').click();
50+
51+
// Analyze <ds-create-item-parent-selector> for accessibility
52+
testA11y('ds-create-item-parent-selector');
53+
});
54+
});

0 commit comments

Comments
 (0)