Skip to content

Commit dbf7fd6

Browse files
committed
Merge remote-tracking branch 'origin/main' into more-eslint
2 parents 6ff2170 + 230055c commit dbf7fd6

File tree

896 files changed

+39832
-9286
lines changed

Some content is hidden

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

896 files changed

+39832
-9286
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
#CHROME_VERSION: "90.0.4430.212-1"
3434
# Bump Node heap size (OOM in CI after upgrading to Angular 15)
3535
NODE_OPTIONS: '--max-old-space-size=4096'
36+
# Project name to use when running docker-compose prior to e2e tests
37+
COMPOSE_PROJECT_NAME: 'ci'
3638
strategy:
3739
# Create a matrix of Node versions to test against (in parallel)
3840
matrix:

config/config.example.yml

Lines changed: 115 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ cache:
7575
anonymousCache:
7676
# Maximum number of pages to cache. Default is zero (0) which means anonymous user cache is disabled.
7777
# As all pages are cached in server memory, increasing this value will increase memory needs.
78-
# Individual cached pages are usually small (<100KB), so a value of max=1000 would only require ~100MB of memory.
78+
# Individual cached pages are usually small (<100KB), so a value of max=1000 would only require ~100MB of memory.
7979
max: 0
8080
# Amount of time after which cached pages are considered stale (in ms). After becoming stale, the cached
8181
# copy is automatically refreshed on the next request.
@@ -131,12 +131,16 @@ submission:
131131
# NOTE: after how many time (milliseconds) submission is saved automatically
132132
# eg. timer: 5 * (1000 * 60); // 5 minutes
133133
timer: 0
134+
# Always show the duplicate detection section if enabled, even if there are no potential duplicates detected
135+
# (a message will be displayed to indicate no matches were found)
136+
duplicateDetection:
137+
alwaysShowSection: false
134138
icons:
135139
metadata:
136140
# NOTE: example of configuration
137141
# # NOTE: metadata name
138142
# - name: dc.author
139-
# # NOTE: fontawesome (v5.x) icon classes and bootstrap utility classes can be used
143+
# # NOTE: fontawesome (v6.x) icon classes and bootstrap utility classes can be used
140144
# style: fas fa-user
141145
- name: dc.author
142146
style: fas fa-user
@@ -147,18 +151,40 @@ submission:
147151
confidence:
148152
# NOTE: example of configuration
149153
# # NOTE: confidence value
150-
# - name: dc.author
151-
# # NOTE: fontawesome (v5.x) icon classes and bootstrap utility classes can be used
152-
# style: fa-user
154+
# - value: 600
155+
# # NOTE: fontawesome (v6.x) icon classes and bootstrap utility classes can be used
156+
# style: text-success
157+
# icon: fa-circle-check
158+
# # NOTE: the class configured in property style is used by default, the icon property could be used in component
159+
# configured to use a 'icon mode' display (mainly in edit-item page)
153160
- value: 600
154161
style: text-success
162+
icon: fa-circle-check
155163
- value: 500
156164
style: text-info
165+
icon: fa-gear
157166
- value: 400
158167
style: text-warning
168+
icon: fa-circle-question
169+
- value: 300
170+
style: text-muted
171+
icon: fa-thumbs-down
172+
- value: 200
173+
style: text-muted
174+
icon: fa-circle-exclamation
175+
- value: 100
176+
style: text-muted
177+
icon: fa-circle-stop
178+
- value: 0
179+
style: text-muted
180+
icon: fa-ban
181+
- value: -1
182+
style: text-muted
183+
icon: fa-circle-xmark
159184
# default configuration
160185
- value: default
161186
style: text-muted
187+
icon: fa-circle-xmark
162188

163189
# Default Language in which the UI will be rendered if the user's browser language is not an active language
164190
defaultLanguage: en
@@ -272,6 +298,8 @@ homePage:
272298
# No. of communities to list per page on the home page
273299
# This will always round to the nearest number from the list of page sizes. e.g. if you set it to 7 it'll use 10
274300
pageSize: 5
301+
# Enable or disable the Discover filters on the homepage
302+
showDiscoverFilters: false
275303

276304
# Item Config
277305
item:
@@ -285,8 +313,17 @@ item:
285313
# settings menu. See pageSizeOptions in 'pagination-component-options.model.ts'.
286314
pageSize: 5
287315

316+
# Community Page Config
317+
community:
318+
# Search tab config
319+
searchSection:
320+
showSidebar: true
321+
288322
# Collection Page Config
289323
collection:
324+
# Search tab config
325+
searchSection:
326+
showSidebar: true
290327
edit:
291328
undoTimeout: 10000 # 10 seconds
292329

@@ -382,7 +419,79 @@ vocabularies:
382419
vocabulary: 'srsc'
383420
enabled: true
384421

385-
# Default collection/community sorting order at Advanced search, Create/update community and collection when there are not a query.
422+
# Default collection/community sorting order at Advanced search, Create/update community and collection when there are not a query.
386423
comcolSelectionSort:
387424
sortField: 'dc.title'
388425
sortDirection: 'ASC'
426+
427+
# Example of fallback collection for suggestions import
428+
# suggestion:
429+
# - collectionId: 8f7df5ca-f9c2-47a4-81ec-8a6393d6e5af
430+
# source: "openaire"
431+
432+
433+
# Search settings
434+
search:
435+
# Settings to enable/disable or configure advanced search filters.
436+
advancedFilters:
437+
enabled: false
438+
# List of filters to enable in "Advanced Search" dropdown
439+
filter: [ 'title', 'author', 'subject', 'entityType' ]
440+
441+
442+
# Notify metrics
443+
# Configuration for Notify Admin Dashboard for metrics visualization
444+
notifyMetrics:
445+
# Configuration for received messages
446+
- title: 'admin-notify-dashboard.received-ldn'
447+
boxes:
448+
- color: '#B8DAFF'
449+
title: 'admin-notify-dashboard.NOTIFY.incoming.accepted'
450+
config: 'NOTIFY.incoming.accepted'
451+
description: 'admin-notify-dashboard.NOTIFY.incoming.accepted.description'
452+
- color: '#D4EDDA'
453+
title: 'admin-notify-dashboard.NOTIFY.incoming.processed'
454+
config: 'NOTIFY.incoming.processed'
455+
description: 'admin-notify-dashboard.NOTIFY.incoming.processed.description'
456+
- color: '#FDBBC7'
457+
title: 'admin-notify-dashboard.NOTIFY.incoming.failure'
458+
config: 'NOTIFY.incoming.failure'
459+
description: 'admin-notify-dashboard.NOTIFY.incoming.failure.description'
460+
- color: '#FDBBC7'
461+
title: 'admin-notify-dashboard.NOTIFY.incoming.untrusted'
462+
config: 'NOTIFY.incoming.untrusted'
463+
description: 'admin-notify-dashboard.NOTIFY.incoming.untrusted.description'
464+
- color: '#43515F'
465+
title: 'admin-notify-dashboard.NOTIFY.incoming.involvedItems'
466+
textColor: '#fff'
467+
config: 'NOTIFY.incoming.involvedItems'
468+
description: 'admin-notify-dashboard.NOTIFY.incoming.involvedItems.description'
469+
# Configuration for outgoing messages
470+
- title: 'admin-notify-dashboard.generated-ldn'
471+
boxes:
472+
- color: '#B8DAFF'
473+
title: 'admin-notify-dashboard.NOTIFY.outgoing.queued'
474+
config: 'NOTIFY.outgoing.queued'
475+
description: 'admin-notify-dashboard.NOTIFY.outgoing.queued.description'
476+
- color: '#FDEEBB'
477+
title: 'admin-notify-dashboard.NOTIFY.outgoing.queued_for_retry'
478+
config: 'NOTIFY.outgoing.queued_for_retry'
479+
description: 'admin-notify-dashboard.NOTIFY.outgoing.queued_for_retry.description'
480+
- color: '#FDBBC7'
481+
title: 'admin-notify-dashboard.NOTIFY.outgoing.failure'
482+
config: 'NOTIFY.outgoing.failure'
483+
description: 'admin-notify-dashboard.NOTIFY.outgoing.failure.description'
484+
- color: '#43515F'
485+
title: 'admin-notify-dashboard.NOTIFY.outgoing.involvedItems'
486+
textColor: '#fff'
487+
config: 'NOTIFY.outgoing.involvedItems'
488+
description: 'admin-notify-dashboard.NOTIFY.outgoing.involvedItems.description'
489+
- color: '#D4EDDA'
490+
title: 'admin-notify-dashboard.NOTIFY.outgoing.delivered'
491+
config: 'NOTIFY.outgoing.delivered'
492+
description: 'admin-notify-dashboard.NOTIFY.outgoing.delivered.description'
493+
494+
495+
496+
497+

cypress.config.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ export default defineConfig({
99
openMode: 0,
1010
},
1111
env: {
12-
// Global constants used in DSpace e2e tests (see also ./cypress/support/e2e.ts)
13-
// May be overridden in our cypress.json config file using specified environment variables.
12+
// Global DSpace environment variables used in all our Cypress e2e tests
13+
// May be modified in this config, or overridden in a variety of ways.
14+
// See Cypress environment variable docs: https://docs.cypress.io/guides/guides/environment-variables
1415
// Default values listed here are all valid for the Demo Entities Data set available at
1516
// https://github.com/DSpace-Labs/AIP-Files/releases/tag/demo-entities-data
1617
// (This is the data set used in our CI environment)
@@ -21,12 +22,14 @@ export default defineConfig({
2122
// Community/collection/publication used for view/edit tests
2223
DSPACE_TEST_COMMUNITY: '0958c910-2037-42a9-81c7-dca80e3892b4',
2324
DSPACE_TEST_COLLECTION: '282164f5-d325-4740-8dd1-fa4d6d3e7200',
24-
DSPACE_TEST_ENTITY_PUBLICATION: 'e98b0f27-5c19-49a0-960d-eb6ad5287067',
25+
DSPACE_TEST_ENTITY_PUBLICATION: '6160810f-1e53-40db-81ef-f6621a727398',
2526
// Search term (should return results) used in search tests
2627
DSPACE_TEST_SEARCH_TERM: 'test',
27-
// Collection used for submission tests
28+
// Main Collection used for submission tests. Should be able to accept normal Item objects
2829
DSPACE_TEST_SUBMIT_COLLECTION_NAME: 'Sample Collection',
2930
DSPACE_TEST_SUBMIT_COLLECTION_UUID: '9d8334e9-25d3-4a67-9cea-3dffdef80144',
31+
// Collection used for Person entity submission tests. MUST be configured with EntityType=Person.
32+
DSPACE_TEST_SUBMIT_PERSON_COLLECTION_NAME: 'People',
3033
// Account used to test basic submission process
3134
DSPACE_TEST_SUBMIT_USER: '[email protected]',
3235
DSPACE_TEST_SUBMIT_USER_PASSWORD: 'dspace',

cypress/e2e/admin-sidebar.cy.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { Options } from 'cypress-axe';
2+
import { testA11y } from 'cypress/support/utils';
3+
4+
describe('Admin Sidebar', () => {
5+
beforeEach(() => {
6+
// Must login as an Admin for sidebar to appear
7+
cy.visit('/login');
8+
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
9+
});
10+
11+
it('should be pinnable and pass accessibility tests', () => {
12+
// Pin the sidebar open
13+
cy.get('#sidebar-collapse-toggle').click();
14+
15+
// Click on every expandable section to open all menus
16+
cy.get('ds-expandable-admin-sidebar-section').click({multiple: true});
17+
18+
// Analyze <ds-admin-sidebar> for accessibility
19+
testA11y('ds-admin-sidebar',
20+
{
21+
rules: {
22+
// Currently all expandable sections have nested interactive elements
23+
// See https://github.com/DSpace/dspace-angular/issues/2178
24+
'nested-interactive': { enabled: false },
25+
}
26+
} as Options);
27+
});
28+
});

cypress/e2e/breadcrumbs.cy.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import { TEST_ENTITY_PUBLICATION } from 'cypress/support/e2e';
21
import { testA11y } from 'cypress/support/utils';
32

43
describe('Breadcrumbs', () => {
54
it('should pass accessibility tests', () => {
65
// Visit an Item, as those have more breadcrumbs
7-
cy.visit('/entities/publication/'.concat(TEST_ENTITY_PUBLICATION));
6+
cy.visit('/entities/publication/'.concat(Cypress.env('DSPACE_TEST_ENTITY_PUBLICATION')));
87

98
// Wait for breadcrumbs to be visible
109
cy.get('ds-breadcrumbs').should('be.visible');

cypress/e2e/browse-by-author.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ describe('Browse By Author', () => {
55
cy.visit('/browse/author');
66

77
// Wait for <ds-browse-by-metadata-page> to be visible
8-
cy.get('ds-browse-by-metadata-page').should('be.visible');
8+
cy.get('ds-browse-by-metadata').should('be.visible');
99

1010
// Analyze <ds-browse-by-metadata-page> for accessibility
11-
testA11y('ds-browse-by-metadata-page');
11+
testA11y('ds-browse-by-metadata');
1212
});
1313
});

cypress/e2e/browse-by-dateissued.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ describe('Browse By Date Issued', () => {
55
cy.visit('/browse/dateissued');
66

77
// Wait for <ds-browse-by-date-page> to be visible
8-
cy.get('ds-browse-by-date-page').should('be.visible');
8+
cy.get('ds-browse-by-date').should('be.visible');
99

1010
// Analyze <ds-browse-by-date-page> for accessibility
11-
testA11y('ds-browse-by-date-page');
11+
testA11y('ds-browse-by-date');
1212
});
1313
});

cypress/e2e/browse-by-subject.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ describe('Browse By Subject', () => {
55
cy.visit('/browse/subject');
66

77
// Wait for <ds-browse-by-metadata-page> to be visible
8-
cy.get('ds-browse-by-metadata-page').should('be.visible');
8+
cy.get('ds-browse-by-metadata').should('be.visible');
99

1010
// Analyze <ds-browse-by-metadata-page> for accessibility
11-
testA11y('ds-browse-by-metadata-page');
11+
testA11y('ds-browse-by-metadata');
1212
});
1313
});

cypress/e2e/browse-by-title.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ describe('Browse By Title', () => {
55
cy.visit('/browse/title');
66

77
// Wait for <ds-browse-by-title-page> to be visible
8-
cy.get('ds-browse-by-title-page').should('be.visible');
8+
cy.get('ds-browse-by-title').should('be.visible');
99

1010
// Analyze <ds-browse-by-title-page> for accessibility
11-
testA11y('ds-browse-by-title-page');
11+
testA11y('ds-browse-by-title');
1212
});
1313
});

0 commit comments

Comments
 (0)