Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions test/integration/collections/CollectionsRepository.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand All @@ -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([
Expand All @@ -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
Expand All @@ -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
Expand Down