From fb1f13df9b2c3b52d691caf314e95b5d6f0c222e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Saracca?= Date: Wed, 26 Mar 2025 15:57:14 -0300 Subject: [PATCH] test: fix due to dataverse api changes --- .../collections/CollectionsRepository.test.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/integration/collections/CollectionsRepository.test.ts b/test/integration/collections/CollectionsRepository.test.ts index 04ac86a6..13441469 100644 --- a/test/integration/collections/CollectionsRepository.test.ts +++ b/test/integration/collections/CollectionsRepository.test.ts @@ -610,8 +610,8 @@ describe('CollectionsRepository', () => { expect((actual.items[0] as CollectionPreview).name).toBe(expectedCollectionsName) expect(actual.facets).toEqual(expectedFacetsFromCollectionOnly) expect(actual.countPerObjectType.dataverses).toBe(1) - expect(actual.countPerObjectType.datasets).toBe(0) - expect(actual.countPerObjectType.files).toBe(0) + expect(actual.countPerObjectType.datasets).toBe(1) + expect(actual.countPerObjectType.files).toBe(1) // Test type dataset const collectionSearchCriteriaForDatasetType = new CollectionSearchCriteria().withItemTypes([ @@ -627,9 +627,9 @@ describe('CollectionsRepository', () => { expect(actual.totalItemCount).toBe(1) expect((actual.items[0] as DatasetPreview).title).toBe(expectedDatasetDescription) expect(actual.facets).toEqual(expectedFacetsFromDatasetOnly) - expect(actual.countPerObjectType.dataverses).toBe(0) + expect(actual.countPerObjectType.dataverses).toBe(1) expect(actual.countPerObjectType.datasets).toBe(1) - expect(actual.countPerObjectType.files).toBe(0) + expect(actual.countPerObjectType.files).toBe(1) // Test type file const collectionSearchCriteriaForFileType = new CollectionSearchCriteria().withItemTypes([ @@ -645,8 +645,8 @@ describe('CollectionsRepository', () => { expect(actual.totalItemCount).toBe(1) expect((actual.items[0] as FilePreview).name).toBe(expectedFileName) expect(actual.facets).toEqual(expectedFacetsFromFileOnly) - expect(actual.countPerObjectType.dataverses).toBe(0) - expect(actual.countPerObjectType.datasets).toBe(0) + expect(actual.countPerObjectType.dataverses).toBe(1) + expect(actual.countPerObjectType.datasets).toBe(1) expect(actual.countPerObjectType.files).toBe(1) // Test multiple types @@ -666,7 +666,7 @@ describe('CollectionsRepository', () => { expect((actual.items[1] as CollectionPreview).name).toBe(expectedCollectionsName) expect(actual.facets).toEqual(expectedFacetsFromCollectionAndFile) expect(actual.countPerObjectType.dataverses).toBe(1) - expect(actual.countPerObjectType.datasets).toBe(0) + expect(actual.countPerObjectType.datasets).toBe(1) expect(actual.countPerObjectType.files).toBe(1) // Test Sort by name ascending