@@ -142,7 +142,7 @@ describe('AttachmentListComponent', () => {
142142 expect ( queryAttachments ( ) . length ) . toBe ( 0 ) ;
143143
144144 component . attachments = [
145- { type : 'image' , img_url : 'http://url1' } ,
145+ { type : 'image' , image_url : 'http://url1' } ,
146146 { type : 'file' , asset_url : 'http://url3' } ,
147147 {
148148 type : 'video' ,
@@ -264,28 +264,28 @@ describe('AttachmentListComponent', () => {
264264
265265 it ( 'should create gallery' , ( ) => {
266266 component . attachments = [
267- { type : 'image' , img_url : 'http://url1' } ,
267+ { type : 'image' , image_url : 'http://url1' } ,
268268 { type : 'file' , asset_url : 'http://url3' } ,
269- { type : 'image' , img_url : 'http://url2' } ,
269+ { type : 'image' , image_url : 'http://url2' } ,
270270 ] ;
271271 component . ngOnChanges ( { attachments : { } as SimpleChange } ) ;
272272 fixture . detectChanges ( ) ;
273273 const orderedAttachments = component . orderedAttachments ;
274274
275275 expect ( orderedAttachments . length ) . toBe ( 2 ) ;
276276 expect ( orderedAttachments [ 0 ] . type ) . toBe ( 'gallery' ) ;
277- expect ( ( orderedAttachments [ 0 ] as GalleryAttachment ) . images [ 0 ] . img_url ) . toBe (
278- 'http://url1'
279- ) ;
280- expect ( ( orderedAttachments [ 0 ] as GalleryAttachment ) . images [ 1 ] . img_url ) . toBe (
281- 'http://url2'
282- ) ;
277+ expect (
278+ ( orderedAttachments [ 0 ] as GalleryAttachment ) . images [ 0 ] . image_url
279+ ) . toBe ( 'http://url1' ) ;
280+ expect (
281+ ( orderedAttachments [ 0 ] as GalleryAttachment ) . images [ 1 ] . image_url
282+ ) . toBe ( 'http://url2' ) ;
283283 } ) ;
284284
285285 it ( 'should display gallery' , ( ) => {
286286 component . attachments = [
287- { type : 'image' , img_url : 'http://url1' } ,
288- { type : 'image' , img_url : 'http://url2' } ,
287+ { type : 'image' , image_url : 'http://url1' } ,
288+ { type : 'image' , image_url : 'http://url2' } ,
289289 ] ;
290290 component . ngOnChanges ( { attachments : { } as SimpleChange } ) ;
291291 fixture . detectChanges ( ) ;
@@ -300,8 +300,8 @@ describe('AttachmentListComponent', () => {
300300 ) . toBeNull ( ) ;
301301
302302 component . attachments = [
303- { type : 'image' , img_url : 'http://url1' } ,
304- { type : 'image' , img_url : 'http://url2' } ,
303+ { type : 'image' , image_url : 'http://url1' } ,
304+ { type : 'image' , image_url : 'http://url2' } ,
305305 { type : 'image' , thumb_url : 'http://url3' } ,
306306 { type : 'image' , image_url : 'http://url4' } ,
307307 ] ;
@@ -320,8 +320,8 @@ describe('AttachmentListComponent', () => {
320320 ) . not . toBeNull ( ) ;
321321
322322 component . attachments = [
323- { type : 'image' , img_url : 'http://url1' } ,
324- { type : 'image' , img_url : 'http://url2' } ,
323+ { type : 'image' , image_url : 'http://url1' } ,
324+ { type : 'image' , image_url : 'http://url2' } ,
325325 { type : 'image' , thumb_url : 'http://url3' } ,
326326 { type : 'image' , image_url : 'http://url4' } ,
327327 { type : 'image' , image_url : 'http://url5' } ,
@@ -471,7 +471,7 @@ describe('AttachmentListComponent', () => {
471471 it ( 'should display image by thumb_url' , ( ) => {
472472 const thumbUrl = 'http://thumb/url' ;
473473 component . attachments = [
474- { type : 'image' , img_url : undefined , thumb_url : thumbUrl } ,
474+ { type : 'image' , image_url : undefined , thumb_url : thumbUrl } ,
475475 ] ;
476476 component . ngOnChanges ( { attachments : { } as SimpleChange } ) ;
477477 fixture . detectChanges ( ) ;
@@ -498,7 +498,7 @@ describe('AttachmentListComponent', () => {
498498 it ( 'should set alt text for image' , ( ) => {
499499 const fallback = 'Fallback is image can not be displayed' ;
500500 component . attachments = [
501- { type : 'image' , img_url : 'http://url1' , fallback } ,
501+ { type : 'image' , image_url : 'http://url1' , fallback } ,
502502 ] ;
503503 component . ngOnChanges ( { attachments : { } as SimpleChange } ) ;
504504 fixture . detectChanges ( ) ;
@@ -508,7 +508,7 @@ describe('AttachmentListComponent', () => {
508508
509509 it ( 'should display add necessary CSS class for SVG images' , ( ) => {
510510 component . attachments = [
511- { type : 'image' , img_url : 'http://image/url' , fallback : 'image.svg' } ,
511+ { type : 'image' , image_url : 'http://image/url' , fallback : 'image.svg' } ,
512512 ] ;
513513 component . ngOnChanges ( { attachments : { } as SimpleChange } ) ;
514514 fixture . detectChanges ( ) ;
@@ -518,7 +518,7 @@ describe('AttachmentListComponent', () => {
518518 ) . not . toBeNull ( ) ;
519519
520520 component . attachments = [
521- { type : 'image' , img_url : 'http://image/url' , fallback : 'image.jpg' } ,
521+ { type : 'image' , image_url : 'http://image/url' , fallback : 'image.jpg' } ,
522522 ] ;
523523 component . ngOnChanges ( { attachments : { } as SimpleChange } ) ;
524524 fixture . detectChanges ( ) ;
@@ -797,7 +797,7 @@ describe('AttachmentListComponent', () => {
797797 } ,
798798 {
799799 type : 'image' ,
800- img_url : 'http://url2' ,
800+ image_url : 'http://url2' ,
801801 } ,
802802 ] ;
803803 component . attachments = attachments ;
@@ -826,7 +826,7 @@ describe('AttachmentListComponent', () => {
826826 } ,
827827 {
828828 type : 'image' ,
829- img_url : 'http://url2' ,
829+ image_url : 'http://url2' ,
830830 } ,
831831 ] ;
832832 component . attachments = attachments ;
@@ -855,7 +855,7 @@ describe('AttachmentListComponent', () => {
855855 } ,
856856 {
857857 type : 'image' ,
858- img_url : 'http://url2' ,
858+ image_url : 'http://url2' ,
859859 } ,
860860 {
861861 type : 'image' ,
@@ -879,7 +879,7 @@ describe('AttachmentListComponent', () => {
879879 queryImageModalNextButton ( ) ?. click ( ) ;
880880 fixture . detectChanges ( ) ;
881881
882- expect ( queryImageModalImage ( ) ?. src ) . toContain ( attachments [ 1 ] . img_url ! ) ;
882+ expect ( queryImageModalImage ( ) ?. src ) . toContain ( attachments [ 1 ] . image_url ! ) ;
883883 expect ( queryImageModalPrevButton ( ) ?. style . visibility ) . toBe ( 'visible' ) ;
884884 expect ( queryImageModalNextButton ( ) ?. style . visibility ) . toBe ( 'visible' ) ;
885885
@@ -964,7 +964,7 @@ describe('AttachmentListComponent', () => {
964964
965965 // Single image, link image, video, giphy
966966 component . attachments = [
967- { type : 'image' , img_url : 'http://url1' } ,
967+ { type : 'image' , image_url : 'http://url1' } ,
968968 {
969969 title : 'BBC - Homepage' ,
970970 title_link : 'https://www.bbc.com/' ,
@@ -1016,11 +1016,11 @@ describe('AttachmentListComponent', () => {
10161016
10171017 // Gallery
10181018 component . attachments = [
1019- { type : 'image' , img_url : 'http://url1' } ,
1020- { type : 'image' , img_url : 'http://url2' } ,
1021- { type : 'image' , img_url : 'http://url3' } ,
1022- { type : 'image' , img_url : 'http://url4' } ,
1023- { type : 'image' , img_url : 'http://url5' } ,
1019+ { type : 'image' , image_url : 'http://url1' } ,
1020+ { type : 'image' , image_url : 'http://url2' } ,
1021+ { type : 'image' , image_url : 'http://url3' } ,
1022+ { type : 'image' , image_url : 'http://url4' } ,
1023+ { type : 'image' , image_url : 'http://url5' } ,
10241024 ] ;
10251025 component . ngOnChanges ( { attachments : { } as SimpleChange } ) ;
10261026 fixture . detectChanges ( ) ;
0 commit comments