From fd104342b5e5e826566c36a4a504c6a8eeed3628 Mon Sep 17 00:00:00 2001 From: milanmajchrak <90026355+milanmajchrak@users.noreply.github.com> Date: Wed, 10 Jan 2024 11:12:28 +0100 Subject: [PATCH] customer/uk-it-8 (#445) * internal/fix-failing-it (#437) * Fixed integration tests - updated login via form - closed discojuice login. Updated licenses path to `licenses/manage-table` * Cancel discojuice if it is popped up in the tombstone test * internal/docker-remove-orphans (#439) * Removed --remove-orphans flag because it doesn't have any effect. * internal/update-config * Copied missing parts from TUL:config/config.yml (#441) --- build-scripts/run/start.sh | 10 +-- config/config.yml | 74 +++++++++++++++++++ cypress/integration/admin-menu.spec.ts | 2 +- .../integration/clarin-licenses-page.spec.ts | 2 +- cypress/integration/tombstone.spec.ts | 3 + docker/docker-compose-rest.yml | 1 + 6 files changed, 85 insertions(+), 7 deletions(-) diff --git a/build-scripts/run/start.sh b/build-scripts/run/start.sh index b548c6df111..436745a9778 100755 --- a/build-scripts/run/start.sh +++ b/build-scripts/run/start.sh @@ -17,7 +17,7 @@ docker pull $DSPACE_UI_IMAGE pushd ../.. echo "=====" docker compose --env-file $ENVFILE -f docker/docker-compose.yml -f docker/docker-compose-rest.yml pull -docker compose --env-file $ENVFILE -p $PROJECT -f docker/docker-compose.yml -f docker/docker-compose-rest.yml up -d --no-build --remove-orphans +docker compose --env-file $ENVFILE -p $PROJECT -f docker/docker-compose.yml -f docker/docker-compose-rest.yml up -d --no-build popd # Create admin user @@ -26,9 +26,9 @@ pushd ../.. echo "=====" #docker compose --env-file $ENVFILE -p $PROJECT -f docker/matomo-w-db.yml pull #docker compose --env-file $ENVFILE -p $PROJECT -f docker/matomo-w-db.yml up -d --no-build -docker compose --env-file $ENVFILE -p $PROJECT -f docker/cli.yml run --rm dspace-cli create-administrator -e test@test.edu -f admin -l user -p admin -c en -o dataquest -docker compose --env-file $ENVFILE -p $PROJECT -f docker/cli.yml run --rm dspace-cli user --add -m user@test.edu -g meno -s priezvisko -l en -p user -o dataquest -docker compose --env-file $ENVFILE -p $PROJECT -f docker/cli.yml run --rm dspace-cli version +docker compose --env-file $ENVFILE -p $PROJECT -f docker/docker-compose.yml -f docker/docker-compose-rest.yml -f docker/cli.yml run --rm dspace-cli create-administrator -e test@test.edu -f admin -l user -p admin -c en -o dataquest +docker compose --env-file $ENVFILE -p $PROJECT -f docker/docker-compose.yml -f docker/docker-compose-rest.yml -f docker/cli.yml run --rm dspace-cli user --add -m user@test.edu -g meno -s priezvisko -l en -p user -o dataquest +docker compose --env-file $ENVFILE -p $PROJECT -f docker/docker-compose.yml -f docker/docker-compose-rest.yml -f docker/cli.yml run --rm dspace-cli version echo "=====" echo "Logs" @@ -40,4 +40,4 @@ echo "Copy assetstore" docker cp assetstore dspace${INSTANCE}:/dspace/ echo "=====" -echo "Finished start.sh" \ No newline at end of file +echo "Finished start.sh" diff --git a/config/config.yml b/config/config.yml index 649e498d7bf..6016a55b498 100644 --- a/config/config.yml +++ b/config/config.yml @@ -65,3 +65,77 @@ cache: # When set to false, after timeToLive expires, the next request will wait on SSR to complete & receive a fresh page (which is then saved to cache). # This ensures stale pages (older than timeToLive) are never returned from the cache, but some users will wait on SSR. allowStale: true + +#info: +# # Whether the end user agreement is required before users may use the repository. +# # If enabled, the user will be required to accept the agreement before they can use the repository. +# # If disabled, the page will not exist and no agreement is required to use the repository +# enableEndUserAgreement: false +# # Whether the privacy statement should exist or not. +# enablePrivacyStatement: false + +# Allow only EN and CS languages +languages: + - code: en + label: English + active: true + - code: ca + label: Català + active: false + - code: cs + label: Čeština + active: true + - code: de + label: Deutsch + active: false + - code: es + label: Español + active: false + - code: fr + label: Français + active: false + - code: gd + label: Gàidhlig + active: false + - code: lv + label: Latviešu + active: false + - code: hu + label: Magyar + active: false + - code: nl + label: Nederlands + active: false + - code: pl + label: Polski + active: false + - code: pt-PT + label: Português + active: false + - code: pt-BR + label: Português do Brasil + active: false + - code: fi + label: Suomi + active: false + - code: sv + label: Svenska + active: false + - code: tr + label: Türkçe + active: false + - code: kk + label: Қазақ + active: false + - code: bn + label: বাংলা + active: false + - code: hi + label: हिंदी + active: false + - code: el + label: Ελληνικά + active: false + - code: uk + label: Yкраї́нська + active: false diff --git a/cypress/integration/admin-menu.spec.ts b/cypress/integration/admin-menu.spec.ts index 5af3955c71c..1845fcdf2e6 100644 --- a/cypress/integration/admin-menu.spec.ts +++ b/cypress/integration/admin-menu.spec.ts @@ -21,6 +21,6 @@ describe('Admin Menu Page', () => { cy.get('.sidebar-top-level-items a[href = "/handle-table"]').scrollIntoView().should('be.visible'); // Check licenses redirect url in the tag - cy.get('.sidebar-top-level-items a[href = "/licenses"]').scrollIntoView().should('be.visible'); + cy.get('.sidebar-top-level-items a[href = "/licenses/manage-table"]').scrollIntoView().should('be.visible'); }); }); diff --git a/cypress/integration/clarin-licenses-page.spec.ts b/cypress/integration/clarin-licenses-page.spec.ts index 1f89db845e3..d5e3ddbf335 100644 --- a/cypress/integration/clarin-licenses-page.spec.ts +++ b/cypress/integration/clarin-licenses-page.spec.ts @@ -17,7 +17,7 @@ describe('License Administration Page', () => { // Login as admin cy.loginViaForm(TEST_ADMIN_USER, TEST_ADMIN_PASSWORD); - cy.visit('/licenses'); + cy.visit('/licenses/manage-table'); // tag must be loaded cy.get('ds-clarin-license-table').should('exist'); diff --git a/cypress/integration/tombstone.spec.ts b/cypress/integration/tombstone.spec.ts index 7e11672977d..30483df241f 100644 --- a/cypress/integration/tombstone.spec.ts +++ b/cypress/integration/tombstone.spec.ts @@ -62,6 +62,9 @@ const TOMBSTONED_ITEM_MESSAGE = 'This item has been withdrawn'; describe('Admin Tombstone Page', () => { beforeEach(() => { cy.visit('/login'); + // Cancel discojuice login - only if it is popped up + cy.wait(500); + cy.get('.discojuice_close').should('exist').click(); // Login as admin cy.loginViaForm(TEST_ADMIN_USER, TEST_ADMIN_PASSWORD); cy.visit('/'); diff --git a/docker/docker-compose-rest.yml b/docker/docker-compose-rest.yml index e76fef152db..edea0b710e8 100644 --- a/docker/docker-compose-rest.yml +++ b/docker/docker-compose-rest.yml @@ -19,6 +19,7 @@ services: restart: unless-stopped container_name: dspace${INSTANCE} environment: + JAVA_OPTS: ${JAVA_OPTS:--Xmx4g} TZ: ${TIMEZONE:-Europe/Bratislava} # Below syntax may look odd, but it is how to override dspace.cfg settings via env variables. # See https://github.com/DSpace/DSpace/blob/main/dspace/config/config-definition.xml