Skip to content

Commit fb1f13d

Browse files
committed
test: fix due to dataverse api changes
1 parent 2642f92 commit fb1f13d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/integration/collections/CollectionsRepository.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,8 @@ describe('CollectionsRepository', () => {
610610
expect((actual.items[0] as CollectionPreview).name).toBe(expectedCollectionsName)
611611
expect(actual.facets).toEqual(expectedFacetsFromCollectionOnly)
612612
expect(actual.countPerObjectType.dataverses).toBe(1)
613-
expect(actual.countPerObjectType.datasets).toBe(0)
614-
expect(actual.countPerObjectType.files).toBe(0)
613+
expect(actual.countPerObjectType.datasets).toBe(1)
614+
expect(actual.countPerObjectType.files).toBe(1)
615615

616616
// Test type dataset
617617
const collectionSearchCriteriaForDatasetType = new CollectionSearchCriteria().withItemTypes([
@@ -627,9 +627,9 @@ describe('CollectionsRepository', () => {
627627
expect(actual.totalItemCount).toBe(1)
628628
expect((actual.items[0] as DatasetPreview).title).toBe(expectedDatasetDescription)
629629
expect(actual.facets).toEqual(expectedFacetsFromDatasetOnly)
630-
expect(actual.countPerObjectType.dataverses).toBe(0)
630+
expect(actual.countPerObjectType.dataverses).toBe(1)
631631
expect(actual.countPerObjectType.datasets).toBe(1)
632-
expect(actual.countPerObjectType.files).toBe(0)
632+
expect(actual.countPerObjectType.files).toBe(1)
633633

634634
// Test type file
635635
const collectionSearchCriteriaForFileType = new CollectionSearchCriteria().withItemTypes([
@@ -645,8 +645,8 @@ describe('CollectionsRepository', () => {
645645
expect(actual.totalItemCount).toBe(1)
646646
expect((actual.items[0] as FilePreview).name).toBe(expectedFileName)
647647
expect(actual.facets).toEqual(expectedFacetsFromFileOnly)
648-
expect(actual.countPerObjectType.dataverses).toBe(0)
649-
expect(actual.countPerObjectType.datasets).toBe(0)
648+
expect(actual.countPerObjectType.dataverses).toBe(1)
649+
expect(actual.countPerObjectType.datasets).toBe(1)
650650
expect(actual.countPerObjectType.files).toBe(1)
651651

652652
// Test multiple types
@@ -666,7 +666,7 @@ describe('CollectionsRepository', () => {
666666
expect((actual.items[1] as CollectionPreview).name).toBe(expectedCollectionsName)
667667
expect(actual.facets).toEqual(expectedFacetsFromCollectionAndFile)
668668
expect(actual.countPerObjectType.dataverses).toBe(1)
669-
expect(actual.countPerObjectType.datasets).toBe(0)
669+
expect(actual.countPerObjectType.datasets).toBe(1)
670670
expect(actual.countPerObjectType.files).toBe(1)
671671

672672
// Test Sort by name ascending

0 commit comments

Comments
 (0)