Skip to content

Commit deff754

Browse files
committed
Merged dspace-cris-2023_02_x into task/dspace-cris-2023_02_x/DSC-2281
2 parents 7c7628a + 5d1abaa commit deff754

File tree

129 files changed

+1740
-461
lines changed

Some content is hidden

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

129 files changed

+1740
-461
lines changed

config/config.example.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ auth:
132132
# If the rest token expires in less than this amount of time, it will be refreshed automatically.
133133
# This is independent from the idle warning.
134134
timeLeftBeforeTokenRefresh: 120000 # 2 minutes
135+
# Standard login enabled
136+
isPasswordLoginEnabledForAdminsOnly: false
135137

136138
# Form settings
137139
form:

cypress.config.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,25 @@ export default defineConfig({
1818
// (This is the data set used in our CI environment)
1919

2020
// Admin account used for administrative tests
21-
DSPACE_TEST_ADMIN_USER: 'dspacedemo+admin@gmail.com',
21+
DSPACE_TEST_ADMIN_USER: 'admin@admin.com',
2222
DSPACE_TEST_ADMIN_USER_UUID: '335647b6-8a52-4ecb-a8c1-7ebabb199bda',
23-
DSPACE_TEST_ADMIN_PASSWORD: 'dspace',
23+
DSPACE_TEST_ADMIN_PASSWORD: 'admin',
2424
// Community/collection/publication used for view/edit tests
25-
DSPACE_TEST_COMMUNITY: '0958c910-2037-42a9-81c7-dca80e3892b4',
26-
DSPACE_TEST_COLLECTION: '282164f5-d325-4740-8dd1-fa4d6d3e7200',
27-
DSPACE_TEST_ENTITY_PUBLICATION: '6160810f-1e53-40db-81ef-f6621a727398',
25+
DSPACE_TEST_COMMUNITY: 'a30b75e4-1682-4b4d-85fd-a47fc78dbcf6',
26+
DSPACE_TEST_COLLECTION: 'caf04bfa-b2f6-40d3-90d2-aa0b86d92f8d',
27+
DSPACE_TEST_ENTITY_PUBLICATION: '9d1efbce-4d55-446c-ac70-0ba8998d04d2',
2828
// Search term (should return results) used in search tests
2929
DSPACE_TEST_SEARCH_TERM: 'test',
3030
// Main Collection used for submission tests. Should be able to accept normal Item objects
31-
DSPACE_TEST_SUBMIT_COLLECTION_NAME: 'Sample Collection',
32-
DSPACE_TEST_SUBMIT_COLLECTION_UUID: '9d8334e9-25d3-4a67-9cea-3dffdef80144',
31+
DSPACE_TEST_SUBMIT_COLLECTION_NAME: 'Equipments',
32+
DSPACE_TEST_SUBMIT_COLLECTION_UUID: 'c1da6a21-451f-430d-ad28-0f16e5b38fa0',
3333
// Collection used for Person entity submission tests. MUST be configured with EntityType=Person.
34-
DSPACE_TEST_SUBMIT_PERSON_COLLECTION_NAME: 'People',
34+
DSPACE_TEST_SUBMIT_PERSON_COLLECTION_NAME: 'Persons',
3535
// Account used to test basic submission process
36-
DSPACE_TEST_SUBMIT_USER: 'dspacedemo+submit@gmail.com',
37-
DSPACE_TEST_SUBMIT_USER_PASSWORD: 'dspace',
36+
DSPACE_TEST_SUBMIT_USER: 'admin@admin.com',
37+
DSPACE_TEST_SUBMIT_USER_PASSWORD: 'admin',
3838
// Administrator users group
39-
DSPACE_ADMINISTRATOR_GROUP: 'e59f5659-bff9-451e-b28f-439e7bd467e4'
39+
DSPACE_ADMINISTRATOR_GROUP: 'f8c90336-34c1-4ad6-ab63-ba4b9357f087'
4040
},
4141
e2e: {
4242
// Setup our plugins for e2e tests

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ describe('Admin Export Modals', () => {
1616
cy.get('#admin-menu-section-export-title').should('be.visible');
1717
cy.get('#admin-menu-section-export-title').click();
1818

19-
cy.get('a[data-test="menu.section.export_metadata"]').click();
19+
cy.get('a[data-test="menu.section.export_metadata_csv"]').click();
2020

2121
// Analyze <ds-export-metadata-selector> for accessibility
22-
testA11y('ds-export-metadata-selector');
22+
testA11y('ds-export-metadata-csv-selector');
2323
});
2424

2525
it('Export batch modal should pass accessibility tests', () => {
@@ -34,6 +34,6 @@ describe('Admin Export Modals', () => {
3434
cy.get('a[data-test="menu.section.export_batch"]').click();
3535

3636
// Analyze <ds-export-batch-selector> for accessibility
37-
testA11y('ds-export-metadata-selector');
37+
testA11y('ds-export-metadata-csv-selector');
3838
});
3939
});

cypress/e2e/breadcrumbs.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { testA11y } from 'cypress/support/utils';
22
import { Options } from 'cypress-axe';
33

4-
xdescribe('Breadcrumbs', () => {
4+
describe('Breadcrumbs', () => {
55
it('should pass accessibility tests', () => {
66
// Visit an Item, as those have more breadcrumbs
77
cy.visit('/entities/publication/'.concat(Cypress.env('DSPACE_TEST_ENTITY_PUBLICATION')));

cypress/e2e/collection-statistics.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { REGEX_MATCH_NON_EMPTY_TEXT } from 'cypress/support/e2e';
22
import { testA11y } from 'cypress/support/utils';
33

4-
xdescribe('Collection Statistics Page', () => {
4+
describe('Collection Statistics Page', () => {
55
const COLLECTIONSTATISTICSPAGE = '/statistics/collections/'.concat(Cypress.env('DSPACE_TEST_COLLECTION'));
66

77
it('should load if you click on "Statistics" from a Collection page', () => {

cypress/e2e/community-statistics.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { REGEX_MATCH_NON_EMPTY_TEXT } from 'cypress/support/e2e';
22
import { testA11y } from 'cypress/support/utils';
33

4-
xdescribe('Community Statistics Page', () => {
4+
describe('Community Statistics Page', () => {
55
const COMMUNITYSTATISTICSPAGE = '/statistics/communities/'.concat(Cypress.env('DSPACE_TEST_COMMUNITY'));
66

77
it('should load if you click on "Statistics" from a Community page', () => {

cypress/e2e/footer.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { testA11y } from 'cypress/support/utils';
22
import { Options } from 'cypress-axe';
33

4-
xdescribe('Footer', () => {
4+
describe('Footer', () => {
55
it('should pass accessibility tests', () => {
66
cy.visit('/');
77

cypress/e2e/homepage-statistics.cy.ts

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@ import { REGEX_MATCH_NON_EMPTY_TEXT } from 'cypress/support/e2e';
22
import { testA11y } from 'cypress/support/utils';
33
import '../support/commands';
44

5-
xdescribe('Site Statistics Page', () => {
5+
describe('Site Statistics Page', () => {
66
it('should load if you click on "Statistics" from homepage', () => {
77
cy.visit('/');
8-
cy.get('a[data-test="link-menu-item.menu.section.statistics"]').click();
8+
9+
cy.get('#expandable-navbar-section-statistics > [data-test="navbar-section-toggler"]').trigger('keyup', { key: 'Enter' });
10+
11+
cy.get('a[data-test="link-menu-item.menu.section.statistics.site"]').click();
912
cy.location('pathname').should('eq', '/statistics');
1013
});
1114

@@ -19,13 +22,23 @@ xdescribe('Site Statistics Page', () => {
1922
// <ds-site-statistics-page> tag must be visable
2023
cy.get('ds-site-statistics-page').should('be.visible');
2124

22-
// Verify / wait until "Total Visits" table's *last* label is non-empty
25+
// Click on "Most viewed" tab
26+
cy.get('ds-statistics-chart li.nav-item').eq(2).click();
27+
28+
// Verify / wait until "Most Viewed" table's *last* label is non-empty
2329
// (This table loads these labels asynchronously, so we want to wait for them before analyzing page)
24-
cy.get('table[data-test="TotalVisits"] th[data-test="statistics-label"]').last().contains(REGEX_MATCH_NON_EMPTY_TEXT);
25-
// Wait an extra 500ms, just so all entries in Total Visits have loaded.
30+
cy.get('table[data-test="TopItems"] th[data-test="statistics-label"]').last().contains(REGEX_MATCH_NON_EMPTY_TEXT);
31+
// Wait an extra 500ms, just so all entries in Most Viewed have loaded.
2632
cy.wait(500);
2733

2834
// Analyze <ds-site-statistics-page> for accessibility issues
29-
testA11y('ds-site-statistics-page');
35+
testA11y({
36+
include: [
37+
'ds-site-statistics-page',
38+
],
39+
exclude: [
40+
['ul.nav-tabs'] // Tabs at top have several issues which seem to be caused by ng-bootstrap
41+
],
42+
});
3043
});
3144
});

cypress/e2e/item-page.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { testA11y } from 'cypress/support/utils';
22

3-
xdescribe('Item Page', () => {
3+
describe('Item Page', () => {
44
const ITEMPAGE = '/items/'.concat(Cypress.env('DSPACE_TEST_ENTITY_PUBLICATION'));
55
const ENTITYPAGE = '/entities/publication/'.concat(Cypress.env('DSPACE_TEST_ENTITY_PUBLICATION'));
66

cypress/e2e/item-statistics.cy.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import { REGEX_MATCH_NON_EMPTY_TEXT } from 'cypress/support/e2e';
22
import { testA11y } from 'cypress/support/utils';
33

4-
xdescribe('Item Statistics Page', () => {
4+
describe('Item Statistics Page', () => {
55
const ITEMSTATISTICSPAGE = '/statistics/items/'.concat(Cypress.env('DSPACE_TEST_ENTITY_PUBLICATION'));
66

7+
const TOTALVISITSPERMONTHITEMSTATISTICSPAGE = ITEMSTATISTICSPAGE.concat('?reportType=TotalVisitsPerMonth');
8+
79
it('should load if you click on "Statistics" from an Item/Entity page', () => {
810
cy.visit('/entities/publication/'.concat(Cypress.env('DSPACE_TEST_ENTITY_PUBLICATION')));
9-
cy.get('a[data-test="link-menu-item.menu.section.statistics"]').click();
11+
cy.get('button[data-test="statisticsButton"]').click();
1012
cy.location('pathname').should('eq', ITEMSTATISTICSPAGE);
1113
});
1214

@@ -21,11 +23,6 @@ xdescribe('Item Statistics Page', () => {
2123
cy.get('table[data-test="TotalVisits"]').should('be.visible');
2224
});
2325

24-
it('should contain a "Total visits per month" section', () => {
25-
cy.visit(ITEMSTATISTICSPAGE);
26-
cy.get('table[data-test="TotalVisitsPerMonth"]').should('be.visible');
27-
});
28-
2926
it('should pass accessibility tests', () => {
3027
cy.visit(ITEMSTATISTICSPAGE);
3128

0 commit comments

Comments
 (0)