@@ -102,6 +102,8 @@ describe('CloudinaryImage', () => {
102102 <cl-transformation width="300" crop="scale" overlay="text:roboto_35_bold:SDK"></cl-transformation>
103103 <cl-transformation effect="art:hokusai"></cl-transformation>
104104 <cl-transformation fetch-format="auto"></cl-transformation>
105+ <cl-transformation if="initialWidth > 400" effect="grayscale"></cl-transformation>
106+ <cl-transformation if="initialHeight < 200" effect="blur"></cl-transformation>
105107 </cl-image>`
106108 } )
107109 class TestComponent { }
@@ -124,7 +126,7 @@ describe('CloudinaryImage', () => {
124126 it ( 'creates an img element which encodes the directive attributes to the URL' , ( ) => {
125127 const img = des . children [ 0 ] . nativeElement as HTMLImageElement ;
126128 expect ( img . src ) . toEqual ( jasmine . stringMatching
127- ( / c _ s c a l e , l _ t e x t : r o b o t o _ 3 5 _ b o l d : S D K , w _ 3 0 0 \/ e _ a r t : h o k u s a i \/ f _ a u t o \/ r e s p o n s i v e _ s a m p l e .j p g / ) ) ;
129+ ( / c _ s c a l e , l _ t e x t : r o b o t o _ 3 5 _ b o l d : S D K , w _ 3 0 0 \/ e _ a r t : h o k u s a i \/ f _ a u t o \/ i f _ i w _ g t _ 4 0 0 , e _ g r a y s c a l e \/ i f _ i h _ l t _ 2 0 0 , e _ b l u r \/ r e s p o n s i v e _ s a m p l e .j p g / ) ) ;
128130 expect ( img . attributes . getNamedItem ( 'data-src' ) ) . toBeNull ( ) ;
129131 } ) ;
130132
@@ -135,7 +137,7 @@ describe('CloudinaryImage', () => {
135137 const observer = new MutationObserver ( ( ) => {
136138 const img = des . children [ 0 ] . nativeElement as HTMLImageElement ;
137139 expect ( img . src ) . toEqual ( jasmine . stringMatching
138- ( / c _ s c a l e , l _ t e x t : r o b o t o _ 3 5 _ b o l d : S D K , w _ 3 0 0 \/ e _ a r t : h o k u s a i \/ f _ a u t o \/ o _ 5 0 \/ r e s p o n s i v e _ s a m p l e .j p g / ) ) ;
140+ ( / c _ s c a l e , l _ t e x t : r o b o t o _ 3 5 _ b o l d : S D K , w _ 3 0 0 \/ e _ a r t : h o k u s a i \/ f _ a u t o \/ i f _ i w _ g t _ 4 0 0 , e _ g r a y s c a l e \/ i f _ i h _ l t _ 2 0 0 , e _ b l u r \/ o _ 5 0 \/ r e s p o n s i v e _ s a m p l e .j p g / ) ) ;
139141 observer . disconnect ( ) ;
140142 done ( ) ;
141143 } ) ;
0 commit comments