diff --git a/src/collections/domain/models/Collection.ts b/src/collections/domain/models/Collection.ts index 9aeb1f2b..d2016e84 100644 --- a/src/collections/domain/models/Collection.ts +++ b/src/collections/domain/models/Collection.ts @@ -13,8 +13,8 @@ export interface Collection { inputLevels?: CollectionInputLevel[] type: CollectionType contacts?: CollectionContact[] - usesMetadataFieldsFromParent: boolean - usesBrowseSearchFacetsFromParent: boolean + isMetadataBlockRoot: boolean + isFacetRoot: boolean } export interface CollectionInputLevel { diff --git a/src/collections/infra/repositories/transformers/CollectionPayload.ts b/src/collections/infra/repositories/transformers/CollectionPayload.ts index afd34a6d..2323bf1a 100644 --- a/src/collections/infra/repositories/transformers/CollectionPayload.ts +++ b/src/collections/infra/repositories/transformers/CollectionPayload.ts @@ -11,8 +11,8 @@ export interface CollectionPayload { inputLevels?: CollectionInputLevelPayload[] dataverseContacts?: CollectionContactPayload[] dataverseType: string - usesMetadataFieldsFromParent: boolean - usesBrowseSearchFacetsFromParent: boolean + isMetadataBlockRoot: boolean + isFacetRoot: boolean } export interface CollectionInputLevelPayload { diff --git a/src/collections/infra/repositories/transformers/collectionTransformers.ts b/src/collections/infra/repositories/transformers/collectionTransformers.ts index aad601bc..34ffe390 100644 --- a/src/collections/infra/repositories/transformers/collectionTransformers.ts +++ b/src/collections/infra/repositories/transformers/collectionTransformers.ts @@ -46,8 +46,8 @@ const transformPayloadToCollection = (collectionPayload: CollectionPayload): Col isReleased: collectionPayload.isReleased, affiliation: collectionPayload.affiliation, type: collectionPayload.dataverseType as CollectionType, - usesMetadataFieldsFromParent: true, // collectionPayload.usesMetadataFieldsFromParent // TODO:ME - Remove hardcoded value once https://github.com/IQSS/dataverse/issues/11012 is done - usesBrowseSearchFacetsFromParent: true, // collectionPayload.usesBrowseSearchFacetsFromParent collectionPayload.usesMetadataFieldsFromParent // TODO:ME - Remove hardcoded value once https://github.com/IQSS/dataverse/issues/11012 is done + isMetadataBlockRoot: collectionPayload.isMetadataBlockRoot, + isFacetRoot: collectionPayload.isFacetRoot, ...(collectionPayload.description && { description: transformHtmlToMarkdown(collectionPayload.description) }), diff --git a/test/environment/.env b/test/environment/.env index 6e32dcbb..340ef3b0 100644 --- a/test/environment/.env +++ b/test/environment/.env @@ -2,5 +2,5 @@ POSTGRES_VERSION=13 DATAVERSE_DB_USER=dataverse SOLR_VERSION=9.3.0 DATAVERSE_IMAGE_REGISTRY=ghcr.io -DATAVERSE_IMAGE_TAG=10904-edit-dataverse-collection +DATAVERSE_IMAGE_TAG=11012-get-dataverse-api-ext DATAVERSE_BOOTSTRAP_TIMEOUT=5m diff --git a/test/integration/collections/CollectionsRepository.test.ts b/test/integration/collections/CollectionsRepository.test.ts index 1265f17b..e4094730 100644 --- a/test/integration/collections/CollectionsRepository.test.ts +++ b/test/integration/collections/CollectionsRepository.test.ts @@ -64,8 +64,8 @@ describe('CollectionsRepository', () => { expect(actual.inputLevels).toBe(undefined) expect(actual.type).toBe(CollectionType.UNCATEGORIZED) expect(actual.contacts).toEqual([{ email: 'root@mailinator.com', displayOrder: 0 }]) - expect(actual.usesMetadataFieldsFromParent).toBe(true) - expect(actual.usesBrowseSearchFacetsFromParent).toBe(true) + expect(actual.isMetadataBlockRoot).toBe(true) + expect(actual.isFacetRoot).toBe(true) }) test('should return isReleased is true for root collection', async () => { diff --git a/test/testHelpers/collections/collectionHelper.ts b/test/testHelpers/collections/collectionHelper.ts index 67fa09ed..f2d2e5ae 100644 --- a/test/testHelpers/collections/collectionHelper.ts +++ b/test/testHelpers/collections/collectionHelper.ts @@ -44,8 +44,8 @@ export const createCollectionModel = (): Collection => { displayOrder: 0 } ], - usesMetadataFieldsFromParent: true, - usesBrowseSearchFacetsFromParent: true + isMetadataBlockRoot: true, + isFacetRoot: true } return collectionModel } @@ -73,8 +73,8 @@ export const createCollectionPayload = (): CollectionPayload => { displayOrder: 0 } ], - usesBrowseSearchFacetsFromParent: true, - usesMetadataFieldsFromParent: true + isMetadataBlockRoot: true, + isFacetRoot: true } return collectionPayload }