From f4dc8ca3d222f774b4424b9dae44577386ca1a28 Mon Sep 17 00:00:00 2001 From: lotte Date: Tue, 28 Nov 2023 19:17:23 +0100 Subject: [PATCH 01/13] 108595: fix for overflowing search filter badge selection --- .../search-label/search-label.component.html | 8 +++++--- .../search-label/search-label.component.scss | 3 +++ .../search-labels/search-label/search-label.component.ts | 1 + .../search/search-labels/search-labels.component.html | 4 ++-- .../search/search-labels/search-labels.component.scss | 9 ++++++++- src/app/shared/search/search.component.html | 4 ++-- 6 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 src/app/shared/search/search-labels/search-label/search-label.component.scss diff --git a/src/app/shared/search/search-labels/search-label/search-label.component.html b/src/app/shared/search/search-labels/search-label/search-label.component.html index bffb7f9329b..5b7b4a9c359 100644 --- a/src/app/shared/search/search-labels/search-label/search-label.component.html +++ b/src/app/shared/search/search-labels/search-label/search-label.component.html @@ -1,6 +1,8 @@ - - {{('search.filters.applied.' + key) | translate}}: {{'search.filters.' + filterName + '.' + value | translate: {default: normalizeFilterValue(value)} }} - × + + {{('search.filters.applied.' + key) | translate}}: {{'search.filters.' + filterName + '.' + value | translate: {default: normalizeFilterValue(value)} }} + × + diff --git a/src/app/shared/search/search-labels/search-label/search-label.component.scss b/src/app/shared/search/search-labels/search-label/search-label.component.scss new file mode 100644 index 00000000000..601f57d407d --- /dev/null +++ b/src/app/shared/search/search-labels/search-label/search-label.component.scss @@ -0,0 +1,3 @@ +.badge { + white-space: inherit; +} diff --git a/src/app/shared/search/search-labels/search-label/search-label.component.ts b/src/app/shared/search/search-labels/search-label/search-label.component.ts index 74526ad2ad4..16d22c17fba 100644 --- a/src/app/shared/search/search-labels/search-label/search-label.component.ts +++ b/src/app/shared/search/search-labels/search-label/search-label.component.ts @@ -11,6 +11,7 @@ import { SearchConfigurationService } from '../../../../core/shared/search/searc @Component({ selector: 'ds-search-label', templateUrl: './search-label.component.html', + styleUrls: ['./search-label.component.scss'] , }) /** diff --git a/src/app/shared/search/search-labels/search-labels.component.html b/src/app/shared/search/search-labels/search-labels.component.html index f6af072c517..4812dd5096e 100644 --- a/src/app/shared/search/search-labels/search-labels.component.html +++ b/src/app/shared/search/search-labels/search-labels.component.html @@ -1,5 +1,5 @@
- - + +
diff --git a/src/app/shared/search/search-labels/search-labels.component.scss b/src/app/shared/search/search-labels/search-labels.component.scss index c48cd573042..348c46571df 100644 --- a/src/app/shared/search/search-labels/search-labels.component.scss +++ b/src/app/shared/search/search-labels/search-labels.component.scss @@ -1,3 +1,10 @@ :host { line-height: 1; -} \ No newline at end of file + .labels { + margin: 0 calc(-1 * var(--bs-spacer)/8); + ds-search-label { + display: inline-block; + padding: 0 calc(var(--bs-spacer)/8); + } + } +} diff --git a/src/app/shared/search/search.component.html b/src/app/shared/search/search.component.html index 5ca3e925a58..1fca08494c9 100644 --- a/src/app/shared/search/search.component.html +++ b/src/app/shared/search/search.component.html @@ -82,8 +82,8 @@ [inPlaceSearch]="inPlaceSearch" [searchPlaceholder]="searchFormPlaceholder | translate"> -
-
+
+
From a026c65a3c6970fae8b72c00667f500a0cff813c Mon Sep 17 00:00:00 2001 From: lotte Date: Thu, 30 Nov 2023 12:14:24 +0100 Subject: [PATCH 02/13] Removed unnecessary change --- .../shared/search/search-labels/search-labels.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/shared/search/search-labels/search-labels.component.html b/src/app/shared/search/search-labels/search-labels.component.html index 4812dd5096e..f6af072c517 100644 --- a/src/app/shared/search/search-labels/search-labels.component.html +++ b/src/app/shared/search/search-labels/search-labels.component.html @@ -1,5 +1,5 @@
- - + +
From fbd35296f03968ae78a38478053fe8d8d3286b21 Mon Sep 17 00:00:00 2001 From: Bram Luyten Date: Tue, 12 Dec 2023 11:16:39 +0100 Subject: [PATCH 03/13] Update robots.txt.ejs Fix for issue #2709 --- src/robots.txt.ejs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/robots.txt.ejs b/src/robots.txt.ejs index cd5e228b3a0..f6dc7fa5cb5 100644 --- a/src/robots.txt.ejs +++ b/src/robots.txt.ejs @@ -16,6 +16,8 @@ Disallow: /submit Disallow: /workspaceitems Disallow: /profile Disallow: /workflowitems +# Crawlers should be able to access entity pages, but not the facet search links present on entity pages +Disallow: /entities/*?f # Optionally uncomment the following line ONLY if sitemaps are working # and you have verified that your site is being indexed correctly. From 06025e42e027b51c1757ffc9705ac91099d68ced Mon Sep 17 00:00:00 2001 From: Art Lowel Date: Tue, 6 Feb 2024 16:53:30 +0100 Subject: [PATCH 04/13] embed the item to submission patch request to fix issue where the submission form would revert to the previous data on save --- src/app/core/json-patch/json-patch-operations.service.spec.ts | 4 ++-- src/app/core/json-patch/json-patch-operations.service.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/core/json-patch/json-patch-operations.service.spec.ts b/src/app/core/json-patch/json-patch-operations.service.spec.ts index 10fc2f2ed84..3fba1c6cf69 100644 --- a/src/app/core/json-patch/json-patch-operations.service.spec.ts +++ b/src/app/core/json-patch/json-patch-operations.service.spec.ts @@ -147,7 +147,7 @@ describe('JsonPatchOperationsService test suite', () => { }); it('should send a new SubmissionPatchRequest', () => { - const expected = new SubmissionPatchRequest(requestService.generateRequestId(), resourceHref, patchOpBody); + const expected = new SubmissionPatchRequest(requestService.generateRequestId(), resourceHref + '?embed=item', patchOpBody); scheduler.schedule(() => service.jsonPatchByResourceType(resourceEndpoint, resourceScope, testJsonPatchResourceType).subscribe()); scheduler.flush(); @@ -237,7 +237,7 @@ describe('JsonPatchOperationsService test suite', () => { }); it('should send a new SubmissionPatchRequest', () => { - const expected = new SubmissionPatchRequest(requestService.generateRequestId(), resourceHref, patchOpBody); + const expected = new SubmissionPatchRequest(requestService.generateRequestId(), resourceHref + '?embed=item', patchOpBody); scheduler.schedule(() => service.jsonPatchByResourceID(resourceEndpoint, resourceScope, testJsonPatchResourceType, testJsonPatchResourceId).subscribe()); scheduler.flush(); diff --git a/src/app/core/json-patch/json-patch-operations.service.ts b/src/app/core/json-patch/json-patch-operations.service.ts index 1dfbd404cc6..1b37665f220 100644 --- a/src/app/core/json-patch/json-patch-operations.service.ts +++ b/src/app/core/json-patch/json-patch-operations.service.ts @@ -18,6 +18,7 @@ import { getFirstCompletedRemoteData } from '../shared/operators'; import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service'; import { RemoteData } from '../data/remote-data'; import { CoreState } from '../core-state.model'; +import { URLCombiner } from '../url-combiner/url-combiner'; /** * An abstract class that provides methods to make JSON Patch requests. @@ -125,7 +126,7 @@ export abstract class JsonPatchOperationsService Date: Fri, 19 Apr 2024 18:15:05 +0200 Subject: [PATCH 05/13] fix lint issues --- src/app/core/json-patch/json-patch-operations.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/core/json-patch/json-patch-operations.service.ts b/src/app/core/json-patch/json-patch-operations.service.ts index fb3fbc07021..e21365a0a7b 100644 --- a/src/app/core/json-patch/json-patch-operations.service.ts +++ b/src/app/core/json-patch/json-patch-operations.service.ts @@ -28,6 +28,7 @@ import { PatchRequest } from '../data/request.models'; import { RequestService } from '../data/request.service'; import { HALEndpointService } from '../shared/hal-endpoint.service'; import { getFirstCompletedRemoteData } from '../shared/operators'; +import { URLCombiner } from '../url-combiner/url-combiner'; import { JsonPatchOperationModel } from './json-patch.model'; import { CommitPatchOperationsAction, @@ -37,7 +38,6 @@ import { } from './json-patch-operations.actions'; import { JsonPatchOperationsResourceEntry } from './json-patch-operations.reducer'; import { jsonPatchOperationsByResourceType } from './selectors'; -import { URLCombiner } from '../url-combiner/url-combiner'; /** * An abstract class that provides methods to make JSON Patch requests. From 96cff30c655e82d3786829e1859ff12f0ea30e5a Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Fri, 19 Apr 2024 16:04:01 -0500 Subject: [PATCH 06/13] Update REST and CI docker compose scripts to sync with 8.0 backend --- docker/docker-compose-ci.yml | 9 ++++++++- docker/docker-compose-rest.yml | 13 ++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/docker/docker-compose-ci.yml b/docker/docker-compose-ci.yml index 07993e20c62..fef7330ba10 100644 --- a/docker/docker-compose-ci.yml +++ b/docker/docker-compose-ci.yml @@ -33,6 +33,7 @@ services: # Tell Statistics to commit all views immediately instead of waiting on Solr's autocommit. # This allows us to generate statistics in e2e tests so that statistics pages can be tested thoroughly. solr__D__statistics__P__autoCommit: 'false' + LOGGING_CONFIG: /dspace/config/log4j2-container.xml image: "${DOCKER_OWNER:-dspace}/dspace:${DSPACE_VER:-latest-test}" depends_on: - dspacedb @@ -60,15 +61,19 @@ services: # NOTE: This is customized to use our loadsql image, so that we are using a database with existing test data dspacedb: container_name: dspacedb + image: "${DOCKER_OWNER:-dspace}/dspace-postgres-pgcrypto:${DSPACE_VER:-latest-loadsql}" environment: # This LOADSQL should be kept in sync with the LOADSQL in # https://github.com/DSpace/DSpace/blob/main/dspace/src/main/docker-compose/db.entities.yml # This SQL is available from https://github.com/DSpace-Labs/AIP-Files/releases/tag/demo-entities-data LOADSQL: https://github.com/DSpace-Labs/AIP-Files/releases/download/demo-entities-data/dspace7-entities-data.sql PGDATA: /pgdata - image: dspace/dspace-postgres-pgcrypto:loadsql + POSTGRES_PASSWORD: dspace networks: - dspacenet + ports: + - published: 5432 + target: 5432 stdin_open: true tty: true volumes: @@ -105,6 +110,8 @@ services: cp -r /opt/solr/server/solr/configsets/statistics/* statistics precreate-core qaevent /opt/solr/server/solr/configsets/qaevent cp -r /opt/solr/server/solr/configsets/qaevent/* qaevent + precreate-core suggestion /opt/solr/server/solr/configsets/suggestion + cp -r /opt/solr/server/solr/configsets/suggestion/* suggestion exec solr -f volumes: assetstore: diff --git a/docker/docker-compose-rest.yml b/docker/docker-compose-rest.yml index e1577ec8375..6267b32bbe3 100644 --- a/docker/docker-compose-rest.yml +++ b/docker/docker-compose-rest.yml @@ -29,8 +29,9 @@ services: # __D__ => "-" (e.g. google__D__metadata => google-metadata) # dspace.dir, dspace.server.url, dspace.ui.url and dspace.name dspace__P__dir: /dspace - dspace__P__server__P__url: http://localhost:8080/server - dspace__P__ui__P__url: http://localhost:4000 + # Uncomment to set a non-default value for dspace.server.url or dspace.ui.url + # dspace__P__server__P__url: http://localhost:8080/server + # dspace__P__ui__P__url: http://localhost:4000 dspace__P__name: 'DSpace Started with Docker Compose' # db.url: Ensure we are using the 'dspacedb' image for our database db__P__url: 'jdbc:postgresql://dspacedb:5432/dspace' @@ -39,6 +40,7 @@ services: # proxies.trusted.ipranges: This setting is required for a REST API running in Docker to trust requests # from the host machine. This IP range MUST correspond to the 'dspacenet' subnet defined above. proxies__P__trusted__P__ipranges: '172.23.0' + LOGGING_CONFIG: /dspace/config/log4j2-container.xml image: "${DOCKER_OWNER:-dspace}/dspace:${DSPACE_VER:-latest-test}" depends_on: - dspacedb @@ -50,6 +52,7 @@ services: stdin_open: true tty: true volumes: + # Keep DSpace assetstore directory between reboots - assetstore:/dspace/assetstore # Ensure that the database is ready BEFORE starting tomcat # 1. While a TCP connection to dspacedb port 5432 is not available, continue to sleep @@ -65,9 +68,11 @@ services: # DSpace database container dspacedb: container_name: dspacedb + # Uses a custom Postgres image with pgcrypto installed + image: "${DOCKER_OWNER:-dspace}/dspace-postgres-pgcrypto:${DSPACE_VER:-latest}" environment: PGDATA: /pgdata - image: "${DOCKER_OWNER:-dspace}/dspace-postgres-pgcrypto:${DSPACE_VER:-latest}" + POSTGRES_PASSWORD: dspace networks: - dspacenet ports: @@ -113,6 +118,8 @@ services: cp -r /opt/solr/server/solr/configsets/statistics/* statistics precreate-core qaevent /opt/solr/server/solr/configsets/qaevent cp -r /opt/solr/server/solr/configsets/qaevent/* qaevent + precreate-core suggestion /opt/solr/server/solr/configsets/suggestion + cp -r /opt/solr/server/solr/configsets/suggestion/* suggestion exec solr -f volumes: assetstore: From a7cdf2e97a09cc74cce81c0f5f9470dab9e5d503 Mon Sep 17 00:00:00 2001 From: Kuno Vercammen Date: Mon, 22 Apr 2024 12:56:11 +0200 Subject: [PATCH 07/13] 114596: Fixed the issue that item template page never loads --- .../dso-edit-metadata/dso-edit-metadata.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts index cded29230e2..3d9b0676556 100644 --- a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts +++ b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts @@ -24,9 +24,9 @@ import { import { BehaviorSubject, combineLatest as observableCombineLatest, - EMPTY, Observable, Subscription, + of, } from 'rxjs'; import { map, @@ -188,7 +188,7 @@ export class DsoEditMetadataComponent implements OnInit, OnDestroy { const lazyProvider$: Observable> = lazyDataService(this.dataServiceMap, this.dsoType, this.parentInjector); return lazyProvider$; } else { - return EMPTY; + return of(this.updateDataService); } } From e13f35eb33118661c9e2b104c8de1acc67464b4f Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Mon, 22 Apr 2024 11:32:19 -0500 Subject: [PATCH 08/13] Update README for DSpace 8 --- docker/README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docker/README.md b/docker/README.md index d0cee3f52a5..64d8ddc2c56 100644 --- a/docker/README.md +++ b/docker/README.md @@ -20,7 +20,7 @@ the Docker compose scripts in this 'docker' folder. ### Dockerfile -This Dockerfile is used to build a *development* DSpace 7 Angular UI image, published as 'dspace/dspace-angular' +This Dockerfile is used to build a *development* DSpace Angular UI image, published as 'dspace/dspace-angular' ``` docker build -t dspace/dspace-angular:latest . @@ -46,11 +46,11 @@ A default/demo version of this image is built *automatically*. ## 'docker' directory - docker-compose.yml - - Starts DSpace Angular with Docker Compose from the current branch. This file assumes that a DSpace 7 REST instance will also be started in Docker. + - Starts DSpace Angular with Docker Compose from the current branch. This file assumes that a DSpace REST instance will also be started in Docker. - docker-compose-rest.yml - - Runs a published instance of the DSpace 7 REST API - persists data in Docker volumes + - Runs a published instance of the DSpace REST API - persists data in Docker volumes - docker-compose-ci.yml - - Runs a published instance of the DSpace 7 REST API for CI testing. The database is re-populated from a SQL dump on each startup. + - Runs a published instance of the DSpace REST API for CI testing. The database is re-populated from a SQL dump on each startup. - cli.yml - Docker compose file that provides a DSpace CLI container to work with a running DSpace REST container. - cli.assetstore.yml @@ -71,7 +71,7 @@ docker-compose -f docker/docker-compose.yml build This command provides a quick way to start both the frontend & backend from this single codebase ``` -docker-compose -p d7 -f docker/docker-compose.yml -f docker/docker-compose-rest.yml up -d +docker-compose -p d8 -f docker/docker-compose.yml -f docker/docker-compose-rest.yml up -d ``` Keep in mind, you may also start the backend by cloning the 'DSpace/DSpace' GitHub repository separately. See the next section. @@ -86,14 +86,14 @@ _The system will be started in 2 steps. Each step shares the same docker network From 'DSpace/DSpace' clone (build first as needed): ``` -docker-compose -p d7 up -d +docker-compose -p d8 up -d ``` NOTE: More detailed instructions on starting the backend via Docker can be found in the [Docker Compose instructions for the Backend](https://github.com/DSpace/DSpace/blob/main/dspace/src/main/docker-compose/README.md). From 'DSpace/dspace-angular' clone (build first as needed) ``` -docker-compose -p d7 -f docker/docker-compose.yml up -d +docker-compose -p d8 -f docker/docker-compose.yml up -d ``` At this point, you should be able to access the UI from http://localhost:4000, @@ -107,19 +107,19 @@ This allows you to run the Angular UI in *production* mode, pointing it at the d ``` docker-compose -f docker/docker-compose-dist.yml pull docker-compose -f docker/docker-compose-dist.yml build -docker-compose -p d7 -f docker/docker-compose-dist.yml up -d +docker-compose -p d8 -f docker/docker-compose-dist.yml up -d ``` ## Ingest test data from AIPDIR Create an administrator ``` -docker-compose -p d7 -f docker/cli.yml run --rm dspace-cli create-administrator -e test@test.edu -f admin -l user -p admin -c en +docker-compose -p d8 -f docker/cli.yml run --rm dspace-cli create-administrator -e test@test.edu -f admin -l user -p admin -c en ``` Load content from AIP files ``` -docker-compose -p d7 -f docker/cli.yml -f ./docker/cli.ingest.yml run --rm dspace-cli +docker-compose -p d8 -f docker/cli.yml -f ./docker/cli.ingest.yml run --rm dspace-cli ``` ## Alternative Ingest - Use Entities dataset @@ -127,12 +127,12 @@ _Delete your docker volumes or use a unique project (-p) name_ Start DSpace with Database Content from a database dump ``` -docker-compose -p d7 -f docker/docker-compose.yml -f docker/docker-compose-rest.yml -f docker/db.entities.yml up -d +docker-compose -p d8 -f docker/docker-compose.yml -f docker/docker-compose-rest.yml -f docker/db.entities.yml up -d ``` Load assetstore content and trigger a re-index of the repository ``` -docker-compose -p d7 -f docker/cli.yml -f docker/cli.assetstore.yml run --rm dspace-cli +docker-compose -p d8 -f docker/cli.yml -f docker/cli.assetstore.yml run --rm dspace-cli ``` ## End to end testing of the REST API (runs in GitHub Actions CI). @@ -140,5 +140,5 @@ _In this instance, only the REST api runs in Docker using the Entities dataset. This command is only really useful for testing our Continuous Integration process. ``` -docker-compose -p d7ci -f docker/docker-compose-ci.yml up -d +docker-compose -p d8ci -f docker/docker-compose-ci.yml up -d ``` From 0ded7a4e0316df31bc11f12ae71598b6cbf6fcd8 Mon Sep 17 00:00:00 2001 From: Kuno Vercammen Date: Tue, 23 Apr 2024 08:50:12 +0200 Subject: [PATCH 09/13] 114596: Added e2e tests for item template page --- cypress/e2e/item-template.cy.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 cypress/e2e/item-template.cy.ts diff --git a/cypress/e2e/item-template.cy.ts b/cypress/e2e/item-template.cy.ts new file mode 100644 index 00000000000..149ec029bf3 --- /dev/null +++ b/cypress/e2e/item-template.cy.ts @@ -0,0 +1,15 @@ +const ADD_TEMPLATE_ITEM_PAGE = '/collections/'.concat(Cypress.env('DSPACE_TEST_COLLECTION')).concat('/itemtemplate'); + +describe('Item Template', () => { + beforeEach(() => { + cy.visit(ADD_TEMPLATE_ITEM_PAGE); + cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD')); + }); + + it('It should display the elements with specific texts', () => { + cy.contains('.ds-header-row .lbl-cell', 'Field', { timeout: 10000 }).should('exist').should('be.visible'); + cy.contains('.ds-header-row b', 'Value', { timeout: 10000 }).should('exist').should('be.visible'); + cy.contains('.ds-header-row b', 'Lang', { timeout: 10000 }).should('exist').should('be.visible'); + cy.contains('.ds-header-row b', 'Edit', { timeout: 10000 }).should('exist').should('be.visible'); + }); +}); From 7767934a5bed328b9312153f5ac780797437ffba Mon Sep 17 00:00:00 2001 From: Kuno Vercammen Date: Tue, 23 Apr 2024 09:03:12 +0200 Subject: [PATCH 10/13] 114596: Small lint fix --- .../dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts index 3d9b0676556..7704abc4ea0 100644 --- a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts +++ b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts @@ -25,8 +25,8 @@ import { BehaviorSubject, combineLatest as observableCombineLatest, Observable, - Subscription, of, + Subscription, } from 'rxjs'; import { map, From af2e0976af7fe7e31be1a9b15e54800798ae6297 Mon Sep 17 00:00:00 2001 From: Art Lowel Date: Wed, 24 Apr 2024 10:54:54 +0200 Subject: [PATCH 11/13] move embed item fix to SubmissionJsonPatchOperationsService --- .../json-patch-operations.service.spec.ts | 4 ++-- .../json-patch/json-patch-operations.service.ts | 3 +-- ...ission-json-patch-operations.service.spec.ts | 15 +++++++++++++++ .../submission-json-patch-operations.service.ts | 17 +++++++++++++++++ 4 files changed, 35 insertions(+), 4 deletions(-) diff --git a/src/app/core/json-patch/json-patch-operations.service.spec.ts b/src/app/core/json-patch/json-patch-operations.service.spec.ts index a53e9e72b00..e1c6e79d107 100644 --- a/src/app/core/json-patch/json-patch-operations.service.spec.ts +++ b/src/app/core/json-patch/json-patch-operations.service.spec.ts @@ -156,7 +156,7 @@ describe('JsonPatchOperationsService test suite', () => { }); it('should send a new SubmissionPatchRequest', () => { - const expected = new SubmissionPatchRequest(requestService.generateRequestId(), resourceHref + '?embed=item', patchOpBody); + const expected = new SubmissionPatchRequest(requestService.generateRequestId(), resourceHref, patchOpBody); scheduler.schedule(() => service.jsonPatchByResourceType(resourceEndpoint, resourceScope, testJsonPatchResourceType).subscribe()); scheduler.flush(); @@ -246,7 +246,7 @@ describe('JsonPatchOperationsService test suite', () => { }); it('should send a new SubmissionPatchRequest', () => { - const expected = new SubmissionPatchRequest(requestService.generateRequestId(), resourceHref + '?embed=item', patchOpBody); + const expected = new SubmissionPatchRequest(requestService.generateRequestId(), resourceHref, patchOpBody); scheduler.schedule(() => service.jsonPatchByResourceID(resourceEndpoint, resourceScope, testJsonPatchResourceType, testJsonPatchResourceId).subscribe()); scheduler.flush(); diff --git a/src/app/core/json-patch/json-patch-operations.service.ts b/src/app/core/json-patch/json-patch-operations.service.ts index e21365a0a7b..552a4354fd7 100644 --- a/src/app/core/json-patch/json-patch-operations.service.ts +++ b/src/app/core/json-patch/json-patch-operations.service.ts @@ -28,7 +28,6 @@ import { PatchRequest } from '../data/request.models'; import { RequestService } from '../data/request.service'; import { HALEndpointService } from '../shared/hal-endpoint.service'; import { getFirstCompletedRemoteData } from '../shared/operators'; -import { URLCombiner } from '../url-combiner/url-combiner'; import { JsonPatchOperationModel } from './json-patch.model'; import { CommitPatchOperationsAction, @@ -145,7 +144,7 @@ export abstract class JsonPatchOperationsService { const rdbService = {} as RemoteDataBuildService; const halEndpointService = {} as HALEndpointService; + const uuid = '91ecbeda-99fe-42ac-9430-b9b75af56f78'; + const href = 'https://rest.api/some/self/link?with=maybe&a=few&other=parameters'; + function initTestService() { return new SubmissionJsonPatchOperationsService( requestService, @@ -36,4 +39,16 @@ describe('SubmissionJsonPatchOperationsService', () => { expect((service as any).patchRequestConstructor).toEqual(SubmissionPatchRequest); }); + describe(`getRequestInstance`, () => { + it(`should add a parameter to embed the item to the request URL`, () => { + const result = (service as any).getRequestInstance(uuid, href); + const resultURL = new URL(result.href); + expect(resultURL.searchParams.get('embed')).toEqual('item'); + + // if we delete the embed item param, it should be identical to the original url + resultURL.searchParams.delete('embed', 'item'); + expect(href).toEqual(resultURL.toString()); + }); + }); + }); diff --git a/src/app/core/submission/submission-json-patch-operations.service.ts b/src/app/core/submission/submission-json-patch-operations.service.ts index 16d74b2bf86..8d454ae2112 100644 --- a/src/app/core/submission/submission-json-patch-operations.service.ts +++ b/src/app/core/submission/submission-json-patch-operations.service.ts @@ -8,6 +8,7 @@ import { RequestService } from '../data/request.service'; import { JsonPatchOperationsService } from '../json-patch/json-patch-operations.service'; import { HALEndpointService } from '../shared/hal-endpoint.service'; import { SubmitDataResponseDefinitionObject } from '../shared/submit-data-response-definition.model'; +import { URLCombiner } from '../url-combiner/url-combiner'; /** * A service that provides methods to make JSON Patch requests. @@ -26,4 +27,20 @@ export class SubmissionJsonPatchOperationsService extends JsonPatchOperationsSer super(); } + /** + * Return an instance for RestRequest class + * + * @param uuid + * The request uuid + * @param href + * The request href + * @param body + * The request body + * @return Object + * instance of PatchRequestDefinition + */ + protected getRequestInstance(uuid: string, href: string, body?: any): SubmissionPatchRequest { + return new this.patchRequestConstructor(uuid, new URLCombiner(href, '?embed=item').toString(), body); + } + } From a1fd59f517dfa6eb8b895c3cfec0934fc922f759 Mon Sep 17 00:00:00 2001 From: Kuno Vercammen Date: Fri, 26 Apr 2024 11:13:22 +0200 Subject: [PATCH 12/13] 114732: Synced the imports of the custom theme with the imports of the base component --- .../browse-by-taxonomy.component.ts | 6 ++--- .../collection-page.component.ts | 2 +- .../edit-item-template-page.component.ts | 2 ++ .../community-page.component.ts | 6 ++++- ...nity-page-sub-collection-list.component.ts | 18 +++++++++++++ .../forgot-email.component.ts | 3 +-- .../forgot-password-form.component.ts | 2 +- .../custom/app/header/header.component.ts | 6 ++++- .../app/home-page/home-page.component.ts | 3 ++- .../item-page/simple/item-page.component.ts | 4 +-- .../publication/publication.component.ts | 26 ++++--------------- .../untyped-item/untyped-item.component.ts | 25 ++++-------------- .../app/login-page/login-page.component.ts | 2 +- .../my-dspace-page.component.ts | 4 +-- .../expandable-navbar-section.component.ts | 9 +++++++ .../profile-page/profile-page.component.ts | 2 +- .../register-email.component.ts | 3 +-- .../shared/browse-by/browse-by.component.ts | 3 +-- .../comcol-page-browse-by.component.ts | 2 ++ .../lang-switch/lang-switch.component.ts | 4 +-- .../app/shared/loading/loading.component.ts | 2 ++ .../object-list/object-list.component.ts | 5 +--- 22 files changed, 72 insertions(+), 67 deletions(-) diff --git a/src/themes/custom/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.ts b/src/themes/custom/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.ts index 80190b92cfc..bf7f379cdaf 100644 --- a/src/themes/custom/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.ts +++ b/src/themes/custom/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.ts @@ -3,7 +3,7 @@ import { NgIf, } from '@angular/common'; import { Component } from '@angular/core'; -import { RouterModule } from '@angular/router'; +import { RouterLink } from '@angular/router'; import { TranslateModule } from '@ngx-translate/core'; import { BrowseByTaxonomyComponent as BaseComponent } from '../../../../../app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component'; @@ -32,16 +32,16 @@ import { VarDirective } from '../../../../../app/shared/utils/var.directive'; ComcolPageHeaderComponent, ComcolPageLogoComponent, NgIf, - RouterModule, ThemedComcolPageHandleComponent, ComcolPageContentComponent, DsoEditMenuComponent, ThemedComcolPageBrowseByComponent, - VocabularyTreeviewComponent, BrowseByComponent, TranslateModule, ThemedLoadingComponent, ThemedBrowseByComponent, + VocabularyTreeviewComponent, + RouterLink, ], }) export class BrowseByTaxonomyComponent extends BaseComponent { diff --git a/src/themes/custom/app/collection-page/collection-page.component.ts b/src/themes/custom/app/collection-page/collection-page.component.ts index 40360833e93..7af9050d401 100644 --- a/src/themes/custom/app/collection-page/collection-page.component.ts +++ b/src/themes/custom/app/collection-page/collection-page.component.ts @@ -43,7 +43,6 @@ import { ViewTrackerComponent } from '../../../../app/statistics/angulartics/dsp ComcolPageContentComponent, ErrorComponent, NgIf, - RouterOutlet, ThemedLoadingComponent, TranslateModule, ViewTrackerComponent, @@ -55,6 +54,7 @@ import { ViewTrackerComponent } from '../../../../app/statistics/angulartics/dsp DsoEditMenuComponent, ThemedComcolPageBrowseByComponent, ObjectCollectionComponent, + RouterOutlet, ], }) /** diff --git a/src/themes/custom/app/collection-page/edit-item-template-page/edit-item-template-page.component.ts b/src/themes/custom/app/collection-page/edit-item-template-page/edit-item-template-page.component.ts index 9ca52219e5b..7ebd0269dad 100644 --- a/src/themes/custom/app/collection-page/edit-item-template-page/edit-item-template-page.component.ts +++ b/src/themes/custom/app/collection-page/edit-item-template-page/edit-item-template-page.component.ts @@ -11,6 +11,7 @@ import { ThemedDsoEditMetadataComponent } from '../../../../../app/dso-shared/ds import { AlertComponent } from '../../../../../app/shared/alert/alert.component'; import { ThemedLoadingComponent } from '../../../../../app/shared/loading/themed-loading.component'; import { VarDirective } from '../../../../../app/shared/utils/var.directive'; +import { DsoEditMetadataComponent } from '../../dso-shared/dso-edit-metadata/dso-edit-metadata.component'; @Component({ selector: 'ds-edit-item-template-page', @@ -20,6 +21,7 @@ import { VarDirective } from '../../../../../app/shared/utils/var.directive'; standalone: true, imports: [ ThemedDsoEditMetadataComponent, + DsoEditMetadataComponent, RouterLink, AsyncPipe, VarDirective, diff --git a/src/themes/custom/app/community-page/community-page.component.ts b/src/themes/custom/app/community-page/community-page.component.ts index fb421c605f6..5de8b806f2b 100644 --- a/src/themes/custom/app/community-page/community-page.component.ts +++ b/src/themes/custom/app/community-page/community-page.component.ts @@ -6,7 +6,10 @@ import { ChangeDetectionStrategy, Component, } from '@angular/core'; -import { RouterModule } from '@angular/router'; +import { + RouterModule, + RouterOutlet, +} from '@angular/router'; import { TranslateModule } from '@ngx-translate/core'; import { CommunityPageComponent as BaseComponent } from '../../../../app/community-page/community-page.component'; @@ -50,6 +53,7 @@ import { ViewTrackerComponent } from '../../../../app/statistics/angulartics/dsp AsyncPipe, ViewTrackerComponent, VarDirective, + RouterOutlet, RouterModule, ], }) diff --git a/src/themes/custom/app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component.ts b/src/themes/custom/app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component.ts index 8ebe26fd44a..775403f065e 100644 --- a/src/themes/custom/app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component.ts +++ b/src/themes/custom/app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component.ts @@ -1,6 +1,15 @@ +import { + AsyncPipe, + NgIf, +} from '@angular/common'; import { Component } from '@angular/core'; +import { TranslateModule } from '@ngx-translate/core'; import { CommunityPageSubCollectionListComponent as BaseComponent } from '../../../../../../../app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component'; +import { ErrorComponent } from '../../../../../../../app/shared/error/error.component'; +import { ThemedLoadingComponent } from '../../../../../../../app/shared/loading/themed-loading.component'; +import { ObjectCollectionComponent } from '../../../../../../../app/shared/object-collection/object-collection.component'; +import { VarDirective } from '../../../../../../../app/shared/utils/var.directive'; @Component({ selector: 'ds-community-page-sub-collection-list', @@ -8,6 +17,15 @@ import { CommunityPageSubCollectionListComponent as BaseComponent } from '../../ styleUrls: ['../../../../../app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component.scss'], // templateUrl: './community-page-sub-collection-list.component.html', templateUrl: '../../../../../app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component.html', + imports: [ + ObjectCollectionComponent, + ErrorComponent, + ThemedLoadingComponent, + NgIf, + TranslateModule, + AsyncPipe, + VarDirective, + ], standalone: true, }) export class CommunityPageSubCollectionListComponent extends BaseComponent { diff --git a/src/themes/custom/app/forgot-password/forgot-password-email/forgot-email.component.ts b/src/themes/custom/app/forgot-password/forgot-password-email/forgot-email.component.ts index 954d3a34195..dad4fd33d84 100644 --- a/src/themes/custom/app/forgot-password/forgot-password-email/forgot-email.component.ts +++ b/src/themes/custom/app/forgot-password/forgot-password-email/forgot-email.component.ts @@ -12,8 +12,7 @@ import { RegisterEmailFormComponent } from '../../../../../app/register-email-fo templateUrl: '../../../../../app/forgot-password/forgot-password-email/forgot-email.component.html', standalone: true, imports: [ - RegisterEmailFormComponent, - ThemedRegisterEmailFormComponent, + RegisterEmailFormComponent, ThemedRegisterEmailFormComponent, ], }) /** diff --git a/src/themes/custom/app/forgot-password/forgot-password-form/forgot-password-form.component.ts b/src/themes/custom/app/forgot-password/forgot-password-form/forgot-password-form.component.ts index 52c0cb565d0..c6d1e3b3c5c 100644 --- a/src/themes/custom/app/forgot-password/forgot-password-form/forgot-password-form.component.ts +++ b/src/themes/custom/app/forgot-password/forgot-password-form/forgot-password-form.component.ts @@ -18,8 +18,8 @@ import { BrowserOnlyPipe } from '../../../../../app/shared/utils/browser-only.pi standalone: true, imports: [ TranslateModule, - ProfilePageSecurityFormComponent, BrowserOnlyPipe, + ProfilePageSecurityFormComponent, AsyncPipe, NgIf, ], diff --git a/src/themes/custom/app/header/header.component.ts b/src/themes/custom/app/header/header.component.ts index fbfe8d5a847..b0b14ca9a61 100644 --- a/src/themes/custom/app/header/header.component.ts +++ b/src/themes/custom/app/header/header.component.ts @@ -1,3 +1,7 @@ +import { + AsyncPipe, + NgIf, +} from '@angular/common'; import { Component } from '@angular/core'; import { RouterLink } from '@angular/router'; import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'; @@ -21,7 +25,7 @@ import { LangSwitchComponent } from '../../../../app/shared/lang-switch/lang-swi // templateUrl: 'header.component.html', templateUrl: '../../../../app/header/header.component.html', standalone: true, - imports: [RouterLink, ThemedLangSwitchComponent, NgbDropdownModule, ThemedSearchNavbarComponent, LangSwitchComponent, ContextHelpToggleComponent, ThemedAuthNavMenuComponent, ImpersonateNavbarComponent, TranslateModule], + imports: [RouterLink, ThemedLangSwitchComponent, NgbDropdownModule, ThemedSearchNavbarComponent, LangSwitchComponent, ContextHelpToggleComponent, ThemedAuthNavMenuComponent, ImpersonateNavbarComponent, TranslateModule, AsyncPipe, NgIf], }) export class HeaderComponent extends BaseComponent { } diff --git a/src/themes/custom/app/home-page/home-page.component.ts b/src/themes/custom/app/home-page/home-page.component.ts index 53ccbf4526e..3f24b34bad2 100644 --- a/src/themes/custom/app/home-page/home-page.component.ts +++ b/src/themes/custom/app/home-page/home-page.component.ts @@ -2,6 +2,7 @@ import { AsyncPipe, NgClass, NgIf, + NgTemplateOutlet, } from '@angular/common'; import { Component } from '@angular/core'; import { TranslateModule } from '@ngx-translate/core'; @@ -25,7 +26,7 @@ import { ViewTrackerComponent } from '../../../../app/statistics/angulartics/dsp // templateUrl: './home-page.component.html' templateUrl: '../../../../app/home-page/home-page.component.html', standalone: true, - imports: [ThemedHomeNewsComponent, NgIf, ViewTrackerComponent, ThemedSearchFormComponent, ThemedTopLevelCommunityListComponent, RecentItemListComponent, AsyncPipe, TranslateModule, NgClass, ConfigurationSearchPageComponent, SuggestionsPopupComponent, ThemedConfigurationSearchPageComponent, PageWithSidebarComponent, HomeCoarComponent], + imports: [ThemedHomeNewsComponent, NgTemplateOutlet, NgIf, ViewTrackerComponent, ThemedSearchFormComponent, ThemedTopLevelCommunityListComponent, RecentItemListComponent, AsyncPipe, TranslateModule, NgClass, ConfigurationSearchPageComponent, SuggestionsPopupComponent, ThemedConfigurationSearchPageComponent, PageWithSidebarComponent, HomeCoarComponent], }) export class HomePageComponent extends BaseComponent { diff --git a/src/themes/custom/app/item-page/simple/item-page.component.ts b/src/themes/custom/app/item-page/simple/item-page.component.ts index 58c85830154..5f5419b82ac 100644 --- a/src/themes/custom/app/item-page/simple/item-page.component.ts +++ b/src/themes/custom/app/item-page/simple/item-page.component.ts @@ -44,11 +44,11 @@ import { ViewTrackerComponent } from '../../../../../app/statistics/angulartics/ ItemVersionsComponent, ErrorComponent, ThemedLoadingComponent, - NotifyRequestsStatusComponent, - QaEventNotificationComponent, TranslateModule, AsyncPipe, NgIf, + NotifyRequestsStatusComponent, + QaEventNotificationComponent, ], }) export class ItemPageComponent extends BaseComponent { diff --git a/src/themes/custom/app/item-page/simple/item-types/publication/publication.component.ts b/src/themes/custom/app/item-page/simple/item-types/publication/publication.component.ts index e558cc6e427..ce56724e4ab 100644 --- a/src/themes/custom/app/item-page/simple/item-types/publication/publication.component.ts +++ b/src/themes/custom/app/item-page/simple/item-types/publication/publication.component.ts @@ -1,4 +1,7 @@ -import { CommonModule } from '@angular/common'; +import { + AsyncPipe, + NgIf, +} from '@angular/common'; import { ChangeDetectionStrategy, Component, @@ -39,26 +42,7 @@ import { ThemedThumbnailComponent } from '../../../../../../../app/thumbnail/the templateUrl: '../../../../../../../app/item-page/simple/item-types/publication/publication.component.html', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, - imports: [ - CommonModule, - ThemedResultsBackButtonComponent, - MiradorViewerComponent, - ThemedItemPageTitleFieldComponent, - DsoEditMenuComponent, - MetadataFieldWrapperComponent, - ThemedThumbnailComponent, - ThemedMediaViewerComponent, - ThemedFileSectionComponent, - ItemPageDateFieldComponent, - ThemedMetadataRepresentationListComponent, - GenericItemPageFieldComponent, - RelatedItemsComponent, - ItemPageAbstractFieldComponent, - TranslateModule, - ItemPageUriFieldComponent, - CollectionsComponent, - RouterLink, - ], + imports: [NgIf, ThemedResultsBackButtonComponent, MiradorViewerComponent, ThemedItemPageTitleFieldComponent, DsoEditMenuComponent, MetadataFieldWrapperComponent, ThemedThumbnailComponent, ThemedMediaViewerComponent, ThemedFileSectionComponent, ItemPageDateFieldComponent, ThemedMetadataRepresentationListComponent, GenericItemPageFieldComponent, RelatedItemsComponent, ItemPageAbstractFieldComponent, ItemPageUriFieldComponent, CollectionsComponent, RouterLink, AsyncPipe, TranslateModule], }) export class PublicationComponent extends BaseComponent { diff --git a/src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.ts b/src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.ts index d9b5fabc0f2..aeae9a519a5 100644 --- a/src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.ts +++ b/src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.ts @@ -1,4 +1,7 @@ -import { CommonModule } from '@angular/common'; +import { + AsyncPipe, + NgIf, +} from '@angular/common'; import { ChangeDetectionStrategy, Component, @@ -38,25 +41,7 @@ import { ThemedThumbnailComponent } from '../../../../../../../app/thumbnail/the templateUrl: '../../../../../../../app/item-page/simple/item-types/untyped-item/untyped-item.component.html', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, - imports: [ - CommonModule, - ThemedItemPageTitleFieldComponent, - DsoEditMenuComponent, - MetadataFieldWrapperComponent, - ThemedThumbnailComponent, - ThemedMediaViewerComponent, - ThemedFileSectionComponent, - ItemPageDateFieldComponent, - ThemedMetadataRepresentationListComponent, - GenericItemPageFieldComponent, - TranslateModule, - MiradorViewerComponent, - ThemedResultsBackButtonComponent, - CollectionsComponent, - RouterLink, - ItemPageUriFieldComponent, - ItemPageAbstractFieldComponent, - ], + imports: [NgIf, ThemedResultsBackButtonComponent, MiradorViewerComponent, ThemedItemPageTitleFieldComponent, DsoEditMenuComponent, MetadataFieldWrapperComponent, ThemedThumbnailComponent, ThemedMediaViewerComponent, ThemedFileSectionComponent, ItemPageDateFieldComponent, ThemedMetadataRepresentationListComponent, GenericItemPageFieldComponent, ItemPageAbstractFieldComponent, ItemPageUriFieldComponent, CollectionsComponent, RouterLink, AsyncPipe, TranslateModule], }) export class UntypedItemComponent extends BaseComponent { } diff --git a/src/themes/custom/app/login-page/login-page.component.ts b/src/themes/custom/app/login-page/login-page.component.ts index ae733a495ab..42da1c87ddc 100644 --- a/src/themes/custom/app/login-page/login-page.component.ts +++ b/src/themes/custom/app/login-page/login-page.component.ts @@ -15,7 +15,7 @@ import { LogInComponent } from '../../../../app/shared/log-in/log-in.component'; // templateUrl: './login-page.component.html' templateUrl: '../../../../app/login-page/login-page.component.html', standalone: true, - imports: [LogInComponent, ThemedLogInComponent ,TranslateModule], + imports: [LogInComponent, ThemedLogInComponent, TranslateModule], }) export class LoginPageComponent extends BaseComponent { } diff --git a/src/themes/custom/app/my-dspace-page/my-dspace-page.component.ts b/src/themes/custom/app/my-dspace-page/my-dspace-page.component.ts index 379c8670c58..178ccc61776 100644 --- a/src/themes/custom/app/my-dspace-page/my-dspace-page.component.ts +++ b/src/themes/custom/app/my-dspace-page/my-dspace-page.component.ts @@ -40,11 +40,11 @@ import { ThemedSearchComponent } from '../../../../app/shared/search/themed-sear imports: [ ThemedSearchComponent, MyDSpaceNewSubmissionComponent, - MyDspaceQaEventsNotificationsComponent, - SuggestionsNotificationComponent, AsyncPipe, RoleDirective, NgIf, + SuggestionsNotificationComponent, + MyDspaceQaEventsNotificationsComponent, ], }) export class MyDSpacePageComponent extends BaseComponent { diff --git a/src/themes/custom/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts b/src/themes/custom/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts index dcadc0d7c86..12955facd3f 100644 --- a/src/themes/custom/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts +++ b/src/themes/custom/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts @@ -1,7 +1,15 @@ +import { + AsyncPipe, + NgComponentOutlet, + NgFor, + NgIf, +} from '@angular/common'; import { Component } from '@angular/core'; +import { RouterLinkActive } from '@angular/router'; import { ExpandableNavbarSectionComponent as BaseComponent } from '../../../../../app/navbar/expandable-navbar-section/expandable-navbar-section.component'; import { slide } from '../../../../../app/shared/animations/slide'; +import { VarDirective } from '../../../../../app/shared/utils/var.directive'; /** * Represents an expandable section in the navbar @@ -14,6 +22,7 @@ import { slide } from '../../../../../app/shared/animations/slide'; styleUrls: ['../../../../../app/navbar/expandable-navbar-section/expandable-navbar-section.component.scss'], animations: [slide], standalone: true, + imports: [VarDirective, RouterLinkActive, NgComponentOutlet, NgIf, NgFor, AsyncPipe], }) export class ExpandableNavbarSectionComponent extends BaseComponent { } diff --git a/src/themes/custom/app/profile-page/profile-page.component.ts b/src/themes/custom/app/profile-page/profile-page.component.ts index b13745c0bf5..a9c6c117594 100644 --- a/src/themes/custom/app/profile-page/profile-page.component.ts +++ b/src/themes/custom/app/profile-page/profile-page.component.ts @@ -23,13 +23,13 @@ import { VarDirective } from '../../../../app/shared/utils/var.directive'; imports: [ ProfilePageMetadataFormComponent, ProfilePageSecurityFormComponent, - SuggestionsNotificationComponent, AsyncPipe, TranslateModule, ProfilePageResearcherFormComponent, VarDirective, NgIf, NgForOf, + SuggestionsNotificationComponent, ], }) /** diff --git a/src/themes/custom/app/register-page/register-email/register-email.component.ts b/src/themes/custom/app/register-page/register-email/register-email.component.ts index 28d22cceec9..7056d0c17cc 100644 --- a/src/themes/custom/app/register-page/register-email/register-email.component.ts +++ b/src/themes/custom/app/register-page/register-email/register-email.component.ts @@ -12,8 +12,7 @@ import { RegisterEmailComponent as BaseComponent } from '../../../../../app/regi templateUrl: '../../../../../app/register-page/register-email/register-email.component.html', standalone: true, imports: [ - RegisterEmailFormComponent, - ThemedRegisterEmailFormComponent, + RegisterEmailFormComponent, ThemedRegisterEmailFormComponent, ], }) /** diff --git a/src/themes/custom/app/shared/browse-by/browse-by.component.ts b/src/themes/custom/app/shared/browse-by/browse-by.component.ts index 579875e547a..0c22495bf0e 100644 --- a/src/themes/custom/app/shared/browse-by/browse-by.component.ts +++ b/src/themes/custom/app/shared/browse-by/browse-by.component.ts @@ -30,8 +30,7 @@ import { StartsWithLoaderComponent } from '../../../../../app/shared/starts-with fadeInOut, ], standalone: true, - imports: [VarDirective, NgClass, NgComponentOutlet, NgIf, ThemedResultsBackButtonComponent, ObjectCollectionComponent, - ThemedLoadingComponent, ErrorComponent, AsyncPipe, TranslateModule, StartsWithLoaderComponent], + imports: [VarDirective, NgClass, NgComponentOutlet, NgIf, ThemedResultsBackButtonComponent, ObjectCollectionComponent, ThemedLoadingComponent, ErrorComponent, AsyncPipe, TranslateModule, StartsWithLoaderComponent], }) export class BrowseByComponent extends BaseComponent { } diff --git a/src/themes/custom/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.ts b/src/themes/custom/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.ts index 957b79491b7..c5a65bbaa00 100644 --- a/src/themes/custom/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.ts +++ b/src/themes/custom/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.ts @@ -1,6 +1,7 @@ import { AsyncPipe, NgForOf, + NgIf, } from '@angular/common'; import { Component } from '@angular/core'; import { FormsModule } from '@angular/forms'; @@ -30,6 +31,7 @@ import { ComcolPageBrowseByComponent as BaseComponent } from '../../../../../app RouterLinkActive, TranslateModule, AsyncPipe, + NgIf, ], }) export class ComcolPageBrowseByComponent extends BaseComponent {} diff --git a/src/themes/custom/app/shared/lang-switch/lang-switch.component.ts b/src/themes/custom/app/shared/lang-switch/lang-switch.component.ts index 32a9a00616b..3385b80d48e 100644 --- a/src/themes/custom/app/shared/lang-switch/lang-switch.component.ts +++ b/src/themes/custom/app/shared/lang-switch/lang-switch.component.ts @@ -1,5 +1,5 @@ import { - NgForOf, + NgFor, NgIf, } from '@angular/common'; import { Component } from '@angular/core'; @@ -15,7 +15,7 @@ import { LangSwitchComponent as BaseComponent } from '../../../../../app/shared/ // templateUrl: './lang-switch.component.html', templateUrl: '../../../../../app/shared/lang-switch/lang-switch.component.html', standalone: true, - imports: [NgIf, NgbDropdownModule, NgForOf, TranslateModule], + imports: [NgIf, NgbDropdownModule, NgFor, TranslateModule], }) export class LangSwitchComponent extends BaseComponent { } diff --git a/src/themes/custom/app/shared/loading/loading.component.ts b/src/themes/custom/app/shared/loading/loading.component.ts index d99499e1b78..a4c42c8e942 100644 --- a/src/themes/custom/app/shared/loading/loading.component.ts +++ b/src/themes/custom/app/shared/loading/loading.component.ts @@ -1,3 +1,4 @@ +import { NgIf } from '@angular/common'; import { Component } from '@angular/core'; import { LoadingComponent as BaseComponent } from '../../../../../app/shared/loading/loading.component'; @@ -9,6 +10,7 @@ import { LoadingComponent as BaseComponent } from '../../../../../app/shared/loa templateUrl: '../../../../../app/shared/loading/loading.component.html', // templateUrl: './loading.component.html' standalone: true, + imports: [NgIf], }) export class LoadingComponent extends BaseComponent { diff --git a/src/themes/custom/app/shared/object-list/object-list.component.ts b/src/themes/custom/app/shared/object-list/object-list.component.ts index e64b36aef57..90602ec50cd 100644 --- a/src/themes/custom/app/shared/object-list/object-list.component.ts +++ b/src/themes/custom/app/shared/object-list/object-list.component.ts @@ -22,10 +22,7 @@ import { BrowserOnlyPipe } from '../../../../../app/shared/utils/browser-only.pi styleUrls: ['../../../../../app/shared/object-list/object-list.component.scss'], // templateUrl: './object-list.component.html' templateUrl: '../../../../../app/shared/object-list/object-list.component.html', - imports: [ - PaginationComponent, NgIf, NgClass, NgFor, SelectableListItemControlComponent, - ImportableListItemControlComponent, ListableObjectComponentLoaderComponent, BrowserOnlyPipe, - ], + imports: [PaginationComponent, NgIf, NgClass, NgFor, SelectableListItemControlComponent, ImportableListItemControlComponent, ListableObjectComponentLoaderComponent, BrowserOnlyPipe], standalone: true, }) From c5e3b1801422d4d42478e44c7da3c7ee5bfc9a2c Mon Sep 17 00:00:00 2001 From: Kuno Vercammen Date: Fri, 26 Apr 2024 13:40:00 +0200 Subject: [PATCH 13/13] 114624: Added small naming fix to e2e test --- cypress/e2e/item-template.cy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/e2e/item-template.cy.ts b/cypress/e2e/item-template.cy.ts index 149ec029bf3..5f5b21a16ab 100644 --- a/cypress/e2e/item-template.cy.ts +++ b/cypress/e2e/item-template.cy.ts @@ -6,7 +6,7 @@ describe('Item Template', () => { cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD')); }); - it('It should display the elements with specific texts', () => { + it('should load properly', () => { cy.contains('.ds-header-row .lbl-cell', 'Field', { timeout: 10000 }).should('exist').should('be.visible'); cy.contains('.ds-header-row b', 'Value', { timeout: 10000 }).should('exist').should('be.visible'); cy.contains('.ds-header-row b', 'Lang', { timeout: 10000 }).should('exist').should('be.visible');