@@ -1118,15 +1118,15 @@ describe('returnImageCollector', () => {
11181118 key : 'heroImage-1' ,
11191119 label : '' ,
11201120 type : 'IMAGE' ,
1121- imageUrl : 'https://cdn.example.com/image.png' ,
1122- description : 'Alt text' ,
1123- hyperlinkUrl : 'https://example.com/install' ,
1121+ src : 'https://cdn.example.com/image.png' ,
1122+ alt : 'Alt text' ,
1123+ href : 'https://example.com/install' ,
11241124 } ,
11251125 } ) ;
11261126 } ) ;
11271127
11281128 // (b) Minimal payload — no hyperlinkUrl
1129- it ( 'should omit hyperlinkUrl when hyperlinkUrl is absent' , ( ) => {
1129+ it ( 'should omit href when hyperlinkUrl is absent' , ( ) => {
11301130 const mockField : ImageField = {
11311131 type : 'IMAGE' ,
11321132 key : 'image' ,
@@ -1135,14 +1135,14 @@ describe('returnImageCollector', () => {
11351135 } ;
11361136 const result = returnImageCollector ( mockField , 0 ) ;
11371137 expect ( result . error ) . toBeNull ( ) ;
1138- expect ( result . output . imageUrl ) . toBe ( 'https://example.com/test-image.png' ) ;
1139- expect ( result . output . description ) . toBe ( 'Alt text' ) ;
1138+ expect ( result . output . src ) . toBe ( 'https://example.com/test-image.png' ) ;
1139+ expect ( result . output . alt ) . toBe ( 'Alt text' ) ;
11401140 expect ( result . output . label ) . toBe ( '' ) ;
1141- expect ( result . output ) . not . toHaveProperty ( 'hyperlinkUrl ' ) ;
1141+ expect ( result . output ) . not . toHaveProperty ( 'href ' ) ;
11421142 } ) ;
11431143
1144- // (c) hyperlinkUrl present — hyperlink emitted; absent — omitted
1145- it ( 'should emit hyperlinkUrl when hyperlinkUrl is set and omit it when absent' , ( ) => {
1144+ // (c) hyperlinkUrl present — href emitted; absent — omitted
1145+ it ( 'should emit href when hyperlinkUrl is set and omit it when absent' , ( ) => {
11461146 const withHyperlink : ImageField = {
11471147 type : 'IMAGE' ,
11481148 key : 'image' ,
@@ -1151,7 +1151,7 @@ describe('returnImageCollector', () => {
11511151 hyperlinkUrl : 'https://example.com/click-target' ,
11521152 } ;
11531153 const resultWith = returnImageCollector ( withHyperlink , 0 ) ;
1154- expect ( resultWith . output . hyperlinkUrl ) . toBe ( 'https://example.com/click-target' ) ;
1154+ expect ( resultWith . output . href ) . toBe ( 'https://example.com/click-target' ) ;
11551155
11561156 const withoutHyperlink : ImageField = {
11571157 type : 'IMAGE' ,
@@ -1160,19 +1160,19 @@ describe('returnImageCollector', () => {
11601160 imageUrl : 'https://example.com/test-image.png' ,
11611161 } ;
11621162 const resultWithout = returnImageCollector ( withoutHyperlink , 0 ) ;
1163- expect ( resultWithout . output ) . not . toHaveProperty ( 'hyperlinkUrl ' ) ;
1163+ expect ( resultWithout . output ) . not . toHaveProperty ( 'href ' ) ;
11641164 } ) ;
11651165
1166- // (d) description passes through verbatim
1167- it ( 'should pass description through verbatim' , ( ) => {
1166+ // (d) description passes through verbatim as alt
1167+ it ( 'should pass description through verbatim as alt ' , ( ) => {
11681168 const mockField : ImageField = {
11691169 type : 'IMAGE' ,
11701170 key : 'image' ,
11711171 description : 'Friendly alt text' ,
11721172 imageUrl : 'https://example.com/test-image.png' ,
11731173 } ;
11741174 const result = returnImageCollector ( mockField , 0 ) ;
1175- expect ( result . output . description ) . toBe ( 'Friendly alt text' ) ;
1175+ expect ( result . output . alt ) . toBe ( 'Friendly alt text' ) ;
11761176 } ) ;
11771177
11781178 // (e) imageUrl absent — src defaults to empty string
@@ -1184,7 +1184,7 @@ describe('returnImageCollector', () => {
11841184 imageUrl : '' ,
11851185 } ;
11861186 const result = returnImageCollector ( mockField , 0 ) ;
1187- expect ( result . output . imageUrl ) . toBe ( '' ) ;
1187+ expect ( result . output . src ) . toBe ( '' ) ;
11881188 } ) ;
11891189
11901190 // (f) output.label === '' for any IMAGE payload
0 commit comments