Skip to content

Commit

Permalink
feat: change property names
Browse files Browse the repository at this point in the history
  • Loading branch information
g-saracca committed Nov 12, 2024
1 parent 654db9d commit f3747d3
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/collections/domain/models/Collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export interface Collection {
inputLevels?: CollectionInputLevel[]
type: CollectionType
contacts?: CollectionContact[]
usesMetadataFieldsFromParent: boolean
usesBrowseSearchFacetsFromParent: boolean
isMetadataBlockRoot: boolean
isFacetRoot: boolean
}

export interface CollectionInputLevel {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export interface CollectionPayload {
inputLevels?: CollectionInputLevelPayload[]
dataverseContacts?: CollectionContactPayload[]
dataverseType: string
usesMetadataFieldsFromParent: boolean
usesBrowseSearchFacetsFromParent: boolean
isMetadataBlockRoot: boolean
isFacetRoot: boolean
}

export interface CollectionInputLevelPayload {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}),
Expand Down
2 changes: 1 addition & 1 deletion test/environment/.env
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions test/integration/collections/CollectionsRepository.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ describe('CollectionsRepository', () => {
expect(actual.inputLevels).toBe(undefined)
expect(actual.type).toBe(CollectionType.UNCATEGORIZED)
expect(actual.contacts).toEqual([{ email: '[email protected]', 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 () => {
Expand Down
8 changes: 4 additions & 4 deletions test/testHelpers/collections/collectionHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export const createCollectionModel = (): Collection => {
displayOrder: 0
}
],
usesMetadataFieldsFromParent: true,
usesBrowseSearchFacetsFromParent: true
isMetadataBlockRoot: true,
isFacetRoot: true
}
return collectionModel
}
Expand Down Expand Up @@ -73,8 +73,8 @@ export const createCollectionPayload = (): CollectionPayload => {
displayOrder: 0
}
],
usesBrowseSearchFacetsFromParent: true,
usesMetadataFieldsFromParent: true
isMetadataBlockRoot: true,
isFacetRoot: true
}
return collectionPayload
}
Expand Down

0 comments on commit f3747d3

Please sign in to comment.