@@ -36,6 +36,14 @@ const testImage = {
3636 } ,
3737 } ,
3838}
39+ const testRepositories = [
40+ {
41+ id : "1183964c-6517-4e25-89ca-68b1b409aed6" ,
42+ shortname : "ORNL DAAC" ,
43+ longname : "Oak Ridge National Laboratory DAAC (ORNL)" ,
44+ url : "https://daac.ornl.gov/" ,
45+ } ,
46+ ]
3947
4048describe ( "Program Info Section" , ( ) => {
4149 it ( "renders logo when present in props" , ( ) => {
@@ -49,7 +57,7 @@ describe("Program Info Section", () => {
4957 programLead = { testString }
5058 leadInvestigator = { testString }
5159 dataManager = { testString }
52- repositoryWebsite = { testUrl }
60+ repositories = { testRepositories }
5361 partnerOrgListing = { testString }
5462 publicationLink = { testUrl }
5563 />
@@ -78,14 +86,14 @@ describe("Program Info Section", () => {
7886 programLead = { testString }
7987 leadInvestigator = { testString }
8088 dataManager = { testString }
81- repositoryWebsite = { testUrl }
89+ repositories = { testRepositories }
8290 partnerOrgListing = { testString }
8391 publicationLink = { testUrl }
8492 />
8593 )
8694 const tree = component . toJSON ( )
8795 const instance = component . root
88- expect ( instance . findByType ( "svg" ) ) . toBeDefined ( )
96+ expect ( instance . findAllByType ( "svg" ) . length ) . toBe ( 2 )
8997 expect ( tree ) . toMatchSnapshot ( )
9098 } )
9199} )
0 commit comments