@@ -68,7 +68,8 @@ describe('CollectionsRepository', () => {
6868 const testCollectionAlias = 'collectionsRepositoryTestCollection'
6969 const sut : CollectionsRepository = new CollectionsRepository ( )
7070 let testCollectionId : number
71- const currentYear = new Date ( ) . getFullYear ( )
71+ // TODO: uncomment this test when https://github.com/IQSS/dataverse/issues/12027 is fixed
72+ // const currentYear = new Date().getFullYear()
7273
7374 beforeAll ( async ( ) => {
7475 // create builtin user and pass API key to APiConfig
@@ -432,7 +433,8 @@ describe('CollectionsRepository', () => {
432433 const actualCollectionPreview = actual . items [ 2 ] as CollectionPreview
433434
434435 const expectedFileMd5 = '68b22040025784da775f55cfcb6dee2e'
435- const expectedDatasetCitationFragment = `Admin, Dataverse; Owner, Dataverse, ${ currentYear } , "Dataset created using the createDataset use case"`
436+ // TODO: uncomment this test when https://github.com/IQSS/dataverse/issues/12027 is fixed
437+ // const expectedDatasetCitationFragment = `Admin, Dataverse; Owner, Dataverse, ${currentYear}, "Dataset created using the createDataset use case"`
436438 const expectedDatasetDescription = 'Dataset created using the createDataset use case'
437439 const expectedFileName = 'test-file-1.txt'
438440 const expectedCollectionsName = 'Scientific Research'
@@ -501,6 +503,8 @@ describe('CollectionsRepository', () => {
501503
502504 expect ( actualFilePreview . checksum ?. type ) . toBe ( 'MD5' )
503505 expect ( actualFilePreview . checksum ?. value ) . toBe ( expectedFileMd5 )
506+ // TODO: uncomment this test when https://github.com/IQSS/dataverse/issues/12027 is fixed
507+ // expect(actualFilePreview.datasetCitation).toContain(expectedDatasetCitationFragment)
504508 expect ( actualFilePreview . datasetId ) . toBe ( testDatasetIds . numericId )
505509 expect ( actualFilePreview . datasetName ) . toBe ( expectedDatasetDescription )
506510 expect ( actualFilePreview . datasetPersistentId ) . toBe ( testDatasetIds . persistentId )
@@ -521,7 +525,8 @@ describe('CollectionsRepository', () => {
521525 expect ( actualFilePreview . canDownloadFile ) . toBe ( true )
522526
523527 expect ( actualDatasetPreview . title ) . toBe ( expectedDatasetDescription )
524- expect ( actualDatasetPreview . citation ) . toContain ( expectedDatasetCitationFragment )
528+ // TODO: uncomment this test when https://github.com/IQSS/dataverse/issues/12027 is fixed
529+ // expect(actualDatasetPreview.citation).toContain(expectedDatasetCitationFragment)
525530 expect ( actualDatasetPreview . description ) . toBe ( 'This is the description of the dataset.' )
526531 expect ( actualDatasetPreview . persistentId ) . not . toBeUndefined ( )
527532 expect ( actualDatasetPreview . persistentId ) . not . toBeUndefined ( )
@@ -994,13 +999,16 @@ describe('CollectionsRepository', () => {
994999
9951000 const expectedFileMd5 = '77c7f03a7d7772907b43f0b322cef723'
9961001
997- const expectedDatasetCitationFragment = `Admin, Dataverse; Owner, Dataverse, ${ currentYear } , "Dataset created using the createDataset use case`
1002+ // TODO: uncomment this test when https://github.com/IQSS/dataverse/issues/12027 is fixed
1003+ // const expectedDatasetCitationFragment = `Admin, Dataverse; Owner, Dataverse, ${currentYear}, "Dataset created using the createDataset use case`
9981004 const expectedDatasetDescription = 'Dataset created using the createDataset use case'
9991005 const expectedFileName = 'test-file-4.tab'
10001006 const expectedCollectionsName = 'Scientific Research'
10011007
10021008 expect ( actualFilePreview . checksum ?. type ) . toBe ( 'MD5' )
10031009 expect ( actualFilePreview . checksum ?. value ) . toBe ( expectedFileMd5 )
1010+ // TODO: uncomment this test when https://github.com/IQSS/dataverse/issues/12027 is fixed
1011+ // expect(actualFilePreview.datasetCitation).toContain(expectedDatasetCitationFragment)
10041012 expect ( actualFilePreview . datasetId ) . toBe ( testDatasetIds . numericId )
10051013 expect ( actualFilePreview . datasetName ) . toBe ( expectedDatasetDescription )
10061014 expect ( actualFilePreview . datasetPersistentId ) . toBe ( testDatasetIds . persistentId )
@@ -1023,7 +1031,8 @@ describe('CollectionsRepository', () => {
10231031 expect ( actualFilePreview . variables ) . toBe ( 3 )
10241032
10251033 expect ( actualDatasetPreview . title ) . toBe ( expectedDatasetDescription )
1026- expect ( actualDatasetPreview . citation ) . toContain ( expectedDatasetCitationFragment )
1034+ // TODO: uncomment this test when https://github.com/IQSS/dataverse/issues/12027 is fixed
1035+ // expect(actualDatasetPreview.citation).toContain(expectedDatasetCitationFragment)
10271036 expect ( actualDatasetPreview . description ) . toBe ( 'This is the description of the dataset.' )
10281037 expect ( actualDatasetPreview . persistentId ) . not . toBeUndefined ( )
10291038 expect ( actualDatasetPreview . persistentId ) . not . toBeUndefined ( )
@@ -1781,7 +1790,8 @@ describe('CollectionsRepository', () => {
17811790 ) as CollectionPreview
17821791
17831792 const expectedFileMd5 = '799b5c8c5fdcfbd56c3943f7a6c35326'
1784- const expectedDatasetCitationFragment = `Admin, Dataverse; Owner, Dataverse, ${ currentYear } , "Dataset created using the createDataset use case"`
1793+ // TODO: uncomment this test when https://github.com/IQSS/dataverse/issues/12027 is fixed
1794+ // const expectedDatasetCitationFragment = `Admin, Dataverse; Owner, Dataverse, ${currentYear}, "Dataset created using the createDataset use case"`
17851795 const expectedDatasetDescription = 'Dataset created using the createDataset use case'
17861796 const expectedFileName = 'test-file-2.txt'
17871797 const expectedCollectionsName = 'Test Collection'
@@ -1802,6 +1812,8 @@ describe('CollectionsRepository', () => {
18021812
18031813 expect ( actualFilePreview . checksum ?. type ) . toBe ( 'MD5' )
18041814 expect ( actualFilePreview . checksum ?. value ) . toBeDefined ( )
1815+ // TODO: uncomment this test when https://github.com/IQSS/dataverse/issues/12027 is fixed
1816+ // expect(actualFilePreview.datasetCitation).toContain(expectedDatasetCitationFragment)
18051817 expect ( actualFilePreview . datasetId ) . toBe ( testDatasetIds . numericId )
18061818 expect ( actualFilePreview . datasetName ) . toBe ( expectedDatasetDescription )
18071819 expect ( actualFilePreview . datasetPersistentId ) . toBe ( testDatasetIds . persistentId )
@@ -1821,7 +1833,8 @@ describe('CollectionsRepository', () => {
18211833 expect ( actualFilePreview . canDownloadFile ) . toBe ( true )
18221834
18231835 expect ( actualDatasetPreview . title ) . toBe ( expectedDatasetDescription )
1824- expect ( actualDatasetPreview . citation ) . toContain ( expectedDatasetCitationFragment )
1836+ // TODO: uncomment this test when https://github.com/IQSS/dataverse/issues/12027 is fixed
1837+ // expect(actualDatasetPreview.citation).toContain(expectedDatasetCitationFragment)
18251838 expect ( actualDatasetPreview . description ) . toBe ( 'This is the description of the dataset.' )
18261839 expect ( actualDatasetPreview . persistentId ) . not . toBeUndefined ( )
18271840 expect ( actualDatasetPreview . persistentId ) . not . toBeUndefined ( )
0 commit comments