Skip to content

Commit 4519702

Browse files
committed
update countPerObjectType in tests
1 parent 34b2588 commit 4519702

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

test/functional/collections/GetMyDataCollectionItems.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ describe('execute', () => {
129129
}
130130
])
131131
expect(actual.countPerObjectType).toEqual({
132-
dataverses: 1,
132+
collections: 1,
133133
datasets: 0,
134134
files: 0
135135
})

test/integration/collections/CollectionsRepository.test.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ describe('CollectionsRepository', () => {
524524
expect(actualCollectionPreview.type).toBe(CollectionItemType.COLLECTION)
525525

526526
expect(actual.totalItemCount).toBe(3)
527-
expect(actual.countPerObjectType.dataverses).toBe(1)
527+
expect(actual.countPerObjectType.collections).toBe(1)
528528
expect(actual.countPerObjectType.datasets).toBe(1)
529529
expect(actual.countPerObjectType.files).toBe(1)
530530

@@ -548,7 +548,7 @@ describe('CollectionsRepository', () => {
548548
)
549549
expect(actual.totalItemCount).toBe(1)
550550
expect((actual.items[0] as FilePreview).name).toBe(expectedFileName)
551-
expect(actual.countPerObjectType.dataverses).toBe(0)
551+
expect(actual.countPerObjectType.collections).toBe(0)
552552
expect(actual.countPerObjectType.datasets).toBe(0)
553553
expect(actual.countPerObjectType.files).toBe(1)
554554

@@ -563,7 +563,7 @@ describe('CollectionsRepository', () => {
563563
)
564564
expect(actual.totalItemCount).toBe(1)
565565
expect((actual.items[0] as DatasetPreview).title).toBe(expectedDatasetDescription)
566-
expect(actual.countPerObjectType.dataverses).toBe(0)
566+
expect(actual.countPerObjectType.collections).toBe(0)
567567
expect(actual.countPerObjectType.datasets).toBe(1)
568568
expect(actual.countPerObjectType.files).toBe(0)
569569

@@ -578,7 +578,7 @@ describe('CollectionsRepository', () => {
578578
expect(actual.totalItemCount).toBe(2)
579579
expect((actual.items[0] as DatasetPreview).title).toBe(expectedDatasetDescription)
580580
expect((actual.items[1] as CollectionPreview).name).toBe(expectedCollectionsName)
581-
expect(actual.countPerObjectType.dataverses).toBe(1)
581+
expect(actual.countPerObjectType.collections).toBe(1)
582582
expect(actual.countPerObjectType.datasets).toBe(1)
583583
expect(actual.countPerObjectType.files).toBe(0)
584584

@@ -592,7 +592,7 @@ describe('CollectionsRepository', () => {
592592
expect(actual.items.length).toBe(1)
593593
expect(actual.totalItemCount).toBe(2)
594594
expect((actual.items[0] as CollectionPreview).name).toBe(expectedCollectionsName)
595-
expect(actual.countPerObjectType.dataverses).toBe(1)
595+
expect(actual.countPerObjectType.collections).toBe(1)
596596
expect(actual.countPerObjectType.datasets).toBe(1)
597597
expect(actual.countPerObjectType.files).toBe(0)
598598

@@ -609,7 +609,7 @@ describe('CollectionsRepository', () => {
609609
expect(actual.totalItemCount).toBe(1)
610610
expect((actual.items[0] as CollectionPreview).name).toBe(expectedCollectionsName)
611611
expect(actual.facets).toEqual(expectedFacetsFromCollectionOnly)
612-
expect(actual.countPerObjectType.dataverses).toBe(1)
612+
expect(actual.countPerObjectType.collections).toBe(1)
613613
expect(actual.countPerObjectType.datasets).toBe(1)
614614
expect(actual.countPerObjectType.files).toBe(1)
615615

@@ -627,7 +627,7 @@ 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(1)
630+
expect(actual.countPerObjectType.collections).toBe(1)
631631
expect(actual.countPerObjectType.datasets).toBe(1)
632632
expect(actual.countPerObjectType.files).toBe(1)
633633

@@ -645,7 +645,7 @@ 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(1)
648+
expect(actual.countPerObjectType.collections).toBe(1)
649649
expect(actual.countPerObjectType.datasets).toBe(1)
650650
expect(actual.countPerObjectType.files).toBe(1)
651651

@@ -665,7 +665,7 @@ describe('CollectionsRepository', () => {
665665
expect((actual.items[0] as FilePreview).name).toBe(expectedFileName)
666666
expect((actual.items[1] as CollectionPreview).name).toBe(expectedCollectionsName)
667667
expect(actual.facets).toEqual(expectedFacetsFromCollectionAndFile)
668-
expect(actual.countPerObjectType.dataverses).toBe(1)
668+
expect(actual.countPerObjectType.collections).toBe(1)
669669
expect(actual.countPerObjectType.datasets).toBe(1)
670670
expect(actual.countPerObjectType.files).toBe(1)
671671

@@ -685,7 +685,7 @@ describe('CollectionsRepository', () => {
685685
expect((actual.items[0] as DatasetPreview).type).toBe(CollectionItemType.DATASET)
686686
expect((actual.items[1] as CollectionPreview).type).toBe(CollectionItemType.COLLECTION)
687687
expect((actual.items[2] as FilePreview).type).toBe(CollectionItemType.FILE)
688-
expect(actual.countPerObjectType.dataverses).toBe(1)
688+
expect(actual.countPerObjectType.collections).toBe(1)
689689
expect(actual.countPerObjectType.datasets).toBe(1)
690690
expect(actual.countPerObjectType.files).toBe(1)
691691

@@ -705,7 +705,7 @@ describe('CollectionsRepository', () => {
705705
expect((actual.items[0] as FilePreview).type).toBe(CollectionItemType.FILE)
706706
expect((actual.items[1] as CollectionPreview).type).toBe(CollectionItemType.COLLECTION)
707707
expect((actual.items[2] as DatasetPreview).type).toBe(CollectionItemType.DATASET)
708-
expect(actual.countPerObjectType.dataverses).toBe(1)
708+
expect(actual.countPerObjectType.collections).toBe(1)
709709
expect(actual.countPerObjectType.datasets).toBe(1)
710710
expect(actual.countPerObjectType.files).toBe(1)
711711

@@ -725,7 +725,7 @@ describe('CollectionsRepository', () => {
725725
expect((actual.items[0] as CollectionPreview).type).toBe(CollectionItemType.COLLECTION)
726726
expect((actual.items[1] as DatasetPreview).type).toBe(CollectionItemType.DATASET)
727727
expect((actual.items[2] as FilePreview).type).toBe(CollectionItemType.FILE)
728-
expect(actual.countPerObjectType.dataverses).toBe(1)
728+
expect(actual.countPerObjectType.collections).toBe(1)
729729
expect(actual.countPerObjectType.datasets).toBe(1)
730730
expect(actual.countPerObjectType.files).toBe(1)
731731

@@ -745,7 +745,7 @@ describe('CollectionsRepository', () => {
745745
expect((actual.items[0] as DatasetPreview).type).toBe(CollectionItemType.DATASET)
746746
expect((actual.items[1] as FilePreview).type).toBe(CollectionItemType.FILE)
747747
expect((actual.items[2] as CollectionPreview).type).toBe(CollectionItemType.COLLECTION)
748-
expect(actual.countPerObjectType.dataverses).toBe(1)
748+
expect(actual.countPerObjectType.collections).toBe(1)
749749
expect(actual.countPerObjectType.datasets).toBe(1)
750750
expect(actual.countPerObjectType.files).toBe(1)
751751

@@ -763,7 +763,7 @@ describe('CollectionsRepository', () => {
763763
expect(actual.totalItemCount).toBe(1)
764764
expect((actual.items[0] as CollectionPreview).name).toBe(expectedCollectionsName)
765765
expect(actual.facets).toEqual(expectedFacetsFromCollectionOnly)
766-
expect(actual.countPerObjectType.dataverses).toBe(1)
766+
expect(actual.countPerObjectType.collections).toBe(1)
767767
expect(actual.countPerObjectType.datasets).toBe(0)
768768
expect(actual.countPerObjectType.files).toBe(0)
769769

@@ -783,7 +783,7 @@ describe('CollectionsRepository', () => {
783783
expect(actual.totalItemCount).toBe(1)
784784
expect((actual.items[0] as DatasetPreview).title).toBe(expectedDatasetDescription)
785785
expect(actual.facets).toEqual(expectedFacetsFromDatasetOnly)
786-
expect(actual.countPerObjectType.dataverses).toBe(0)
786+
expect(actual.countPerObjectType.collections).toBe(0)
787787
expect(actual.countPerObjectType.datasets).toBe(1)
788788
expect(actual.countPerObjectType.files).toBe(0)
789789

@@ -802,7 +802,7 @@ describe('CollectionsRepository', () => {
802802
expect(actual.totalItemCount).toBe(1)
803803
expect((actual.items[0] as FilePreview).name).toBe(expectedFileName)
804804
expect(actual.facets).toEqual(expectedFacetsFromFileOnly)
805-
expect(actual.countPerObjectType.dataverses).toBe(0)
805+
expect(actual.countPerObjectType.collections).toBe(0)
806806
expect(actual.countPerObjectType.datasets).toBe(0)
807807
expect(actual.countPerObjectType.files).toBe(1)
808808
})

test/unit/collections/CollectionsRepository.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ describe('CollectionsRepository', () => {
375375
const testTotalCount = 2
376376
const testFacets = createCollectionItemsFacetsModel()
377377
const testCountPerObjectType = {
378-
dataverses: 0,
378+
collections: 0,
379379
datasets: 1,
380380
files: 1
381381
}

0 commit comments

Comments
 (0)