Skip to content

Commit a63a69d

Browse files
committed
Merge remote-tracking branch 'origin/main' into multiline-search-filter-badge_main
2 parents b11fa60 + 061129e commit a63a69d

908 files changed

Lines changed: 43258 additions & 5040 deletions

File tree

Some content is hidden

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

.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: 53 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.
@@ -136,7 +136,7 @@ submission:
136136
# NOTE: example of configuration
137137
# # NOTE: metadata name
138138
# - name: dc.author
139-
# # NOTE: fontawesome (v5.x) icon classes and bootstrap utility classes can be used
139+
# # NOTE: fontawesome (v6.x) icon classes and bootstrap utility classes can be used
140140
# style: fas fa-user
141141
- name: dc.author
142142
style: fas fa-user
@@ -147,18 +147,40 @@ submission:
147147
confidence:
148148
# NOTE: example of configuration
149149
# # 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
150+
# - value: 600
151+
# # NOTE: fontawesome (v6.x) icon classes and bootstrap utility classes can be used
152+
# style: text-success
153+
# icon: fa-circle-check
154+
# # NOTE: the class configured in property style is used by default, the icon property could be used in component
155+
# configured to use a 'icon mode' display (mainly in edit-item page)
153156
- value: 600
154157
style: text-success
158+
icon: fa-circle-check
155159
- value: 500
156160
style: text-info
161+
icon: fa-gear
157162
- value: 400
158163
style: text-warning
164+
icon: fa-circle-question
165+
- value: 300
166+
style: text-muted
167+
icon: fa-thumbs-down
168+
- value: 200
169+
style: text-muted
170+
icon: fa-circle-exclamation
171+
- value: 100
172+
style: text-muted
173+
icon: fa-circle-stop
174+
- value: 0
175+
style: text-muted
176+
icon: fa-ban
177+
- value: -1
178+
style: text-muted
179+
icon: fa-circle-xmark
159180
# default configuration
160181
- value: default
161182
style: text-muted
183+
icon: fa-circle-xmark
162184

163185
# Default Language in which the UI will be rendered if the user's browser language is not an active language
164186
defaultLanguage: en
@@ -272,6 +294,8 @@ homePage:
272294
# No. of communities to list per page on the home page
273295
# 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
274296
pageSize: 5
297+
# Enable or disable the Discover filters on the homepage
298+
showDiscoverFilters: false
275299

276300
# Item Config
277301
item:
@@ -285,8 +309,17 @@ item:
285309
# settings menu. See pageSizeOptions in 'pagination-component-options.model.ts'.
286310
pageSize: 5
287311

312+
# Community Page Config
313+
community:
314+
# Search tab config
315+
searchSection:
316+
showSidebar: true
317+
288318
# Collection Page Config
289319
collection:
320+
# Search tab config
321+
searchSection:
322+
showSidebar: true
290323
edit:
291324
undoTimeout: 10000 # 10 seconds
292325

@@ -382,7 +415,21 @@ vocabularies:
382415
vocabulary: 'srsc'
383416
enabled: true
384417

385-
# Default collection/community sorting order at Advanced search, Create/update community and collection when there are not a query.
418+
# Default collection/community sorting order at Advanced search, Create/update community and collection when there are not a query.
386419
comcolSelectionSort:
387420
sortField: 'dc.title'
388421
sortDirection: 'ASC'
422+
423+
# Example of fallback collection for suggestions import
424+
# suggestion:
425+
# - collectionId: 8f7df5ca-f9c2-47a4-81ec-8a6393d6e5af
426+
# source: "openaire"
427+
428+
429+
# Search settings
430+
search:
431+
# Settings to enable/disable or configure advanced search filters.
432+
advancedFilters:
433+
enabled: false
434+
# List of filters to enable in "Advanced Search" dropdown
435+
filter: [ 'title', 'author', 'subject', 'entityType' ]

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: 'dspacedemo+submit@gmail.com',
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
});

cypress/e2e/collection-edit.cy.ts

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
import { testA11y } from 'cypress/support/utils';
2+
3+
const COLLECTION_EDIT_PAGE = '/collections/'.concat(Cypress.env('DSPACE_TEST_COLLECTION')).concat('/edit');
4+
5+
beforeEach(() => {
6+
// All tests start with visiting the Edit Collection Page
7+
cy.visit(COLLECTION_EDIT_PAGE);
8+
9+
// This page is restricted, so we will be shown the login form. Fill it out & submit.
10+
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
11+
});
12+
13+
describe('Edit Collection > Edit Metadata tab', () => {
14+
it('should pass accessibility tests', () => {
15+
// <ds-edit-collection> tag must be loaded
16+
cy.get('ds-edit-collection').should('be.visible');
17+
18+
// Analyze <ds-edit-collection> for accessibility issues
19+
testA11y('ds-edit-collection');
20+
});
21+
});
22+
23+
describe('Edit Collection > Assign Roles tab', () => {
24+
25+
it('should pass accessibility tests', () => {
26+
cy.get('a[data-test="roles"]').click();
27+
28+
// <ds-collection-roles> tag must be loaded
29+
cy.get('ds-collection-roles').should('be.visible');
30+
31+
// Analyze for accessibility issues
32+
testA11y('ds-collection-roles');
33+
});
34+
});
35+
36+
describe('Edit Collection > Content Source tab', () => {
37+
38+
it('should pass accessibility tests', () => {
39+
cy.get('a[data-test="source"]').click();
40+
41+
// <ds-collection-source> tag must be loaded
42+
cy.get('ds-collection-source').should('be.visible');
43+
44+
// Check the external source checkbox (to display all fields on the page)
45+
cy.get('#externalSourceCheck').check();
46+
47+
// Wait for the source controls to appear
48+
// cy.get('ds-collection-source-controls').should('be.visible');
49+
50+
// Analyze entire page for accessibility issues
51+
testA11y('ds-collection-source');
52+
});
53+
});
54+
55+
describe('Edit Collection > Curate tab', () => {
56+
57+
it('should pass accessibility tests', () => {
58+
cy.get('a[data-test="curate"]').click();
59+
60+
// <ds-collection-curate> tag must be loaded
61+
cy.get('ds-collection-curate').should('be.visible');
62+
63+
// Analyze for accessibility issues
64+
testA11y('ds-collection-curate');
65+
});
66+
});
67+
68+
describe('Edit Collection > Access Control tab', () => {
69+
70+
it('should pass accessibility tests', () => {
71+
cy.get('a[data-test="access-control"]').click();
72+
73+
// <ds-collection-access-control> tag must be loaded
74+
cy.get('ds-collection-access-control').should('be.visible');
75+
76+
// Analyze for accessibility issues
77+
testA11y('ds-collection-access-control');
78+
});
79+
});
80+
81+
describe('Edit Collection > Authorizations tab', () => {
82+
83+
it('should pass accessibility tests', () => {
84+
cy.get('a[data-test="authorizations"]').click();
85+
86+
// <ds-collection-authorizations> tag must be loaded
87+
cy.get('ds-collection-authorizations').should('be.visible');
88+
89+
// Analyze for accessibility issues
90+
testA11y('ds-collection-authorizations');
91+
});
92+
});
93+
94+
describe('Edit Collection > Item Mapper tab', () => {
95+
96+
it('should pass accessibility tests', () => {
97+
cy.get('a[data-test="mapper"]').click();
98+
99+
// <ds-collection-item-mapper> tag must be loaded
100+
cy.get('ds-collection-item-mapper').should('be.visible');
101+
102+
// Analyze entire page for accessibility issues
103+
testA11y('ds-collection-item-mapper');
104+
105+
// Click on the "Map new Items" tab
106+
cy.get('li[data-test="mapTab"] a').click();
107+
108+
// Make sure search form is now visible
109+
cy.get('ds-search-form').should('be.visible');
110+
111+
// Analyze entire page (again) for accessibility issues
112+
testA11y('ds-collection-item-mapper');
113+
});
114+
});
115+
116+
117+
describe('Edit Collection > Delete page', () => {
118+
119+
it('should pass accessibility tests', () => {
120+
cy.get('a[data-test="delete-button"]').click();
121+
122+
// <ds-delete-collection> tag must be loaded
123+
cy.get('ds-delete-collection').should('be.visible');
124+
125+
// Analyze for accessibility issues
126+
testA11y('ds-delete-collection');
127+
});
128+
});

0 commit comments

Comments
 (0)