@@ -96,31 +96,31 @@ describe('ThumbnailComponent', () => {
9696
9797 describe ( 'loading' , ( ) => {
9898 it ( 'should start out with isLoading$ true' , ( ) => {
99- expect ( comp . isLoading$ . getValue ( ) ) . toBeTrue ( ) ;
99+ expect ( comp . isLoading ) . toBeTrue ( ) ;
100100 } ) ;
101101
102102 it ( 'should set isLoading$ to false once an image is successfully loaded' , ( ) => {
103103 comp . setSrc ( 'http://bit.stream' ) ;
104104 fixture . debugElement . query ( By . css ( 'img.thumbnail-content' ) ) . triggerEventHandler ( 'load' , new Event ( 'load' ) ) ;
105- expect ( comp . isLoading$ . getValue ( ) ) . toBeFalse ( ) ;
105+ expect ( comp . isLoading ) . toBeFalse ( ) ;
106106 } ) ;
107107
108108 it ( 'should set isLoading$ to false once the src is set to null' , ( ) => {
109109 comp . setSrc ( null ) ;
110- expect ( comp . isLoading$ . getValue ( ) ) . toBeFalse ( ) ;
110+ expect ( comp . isLoading ) . toBeFalse ( ) ;
111111 } ) ;
112112
113113 it ( 'should show a loading animation while isLoading$ is true' , ( ) => {
114114 expect ( de . query ( By . css ( 'ds-loading' ) ) ) . toBeTruthy ( ) ;
115115
116- comp . isLoading$ . next ( false ) ;
116+ comp . isLoading = false ;
117117 fixture . detectChanges ( ) ;
118118 expect ( fixture . debugElement . query ( By . css ( 'ds-loading' ) ) ) . toBeFalsy ( ) ;
119119 } ) ;
120120
121121 describe ( 'with a thumbnail image' , ( ) => {
122122 beforeEach ( ( ) => {
123- comp . src$ . next ( 'https://bit.stream' ) ;
123+ comp . src = 'https://bit.stream' ;
124124 fixture . detectChanges ( ) ;
125125 } ) ;
126126
@@ -129,7 +129,7 @@ describe('ThumbnailComponent', () => {
129129 expect ( img ) . toBeTruthy ( ) ;
130130 expect ( img . classes [ 'd-none' ] ) . toBeTrue ( ) ;
131131
132- comp . isLoading$ . next ( false ) ;
132+ comp . isLoading = false ;
133133 fixture . detectChanges ( ) ;
134134 img = fixture . debugElement . query ( By . css ( 'img.thumbnail-content' ) ) ;
135135 expect ( img ) . toBeTruthy ( ) ;
@@ -140,14 +140,14 @@ describe('ThumbnailComponent', () => {
140140
141141 describe ( 'without a thumbnail image' , ( ) => {
142142 beforeEach ( ( ) => {
143- comp . src$ . next ( null ) ;
143+ comp . src = null ;
144144 fixture . detectChanges ( ) ;
145145 } ) ;
146146
147147 it ( 'should only show the HTML placeholder once done loading' , ( ) => {
148148 expect ( fixture . debugElement . query ( By . css ( 'div.thumbnail-placeholder' ) ) ) . toBeFalsy ( ) ;
149149
150- comp . isLoading$ . next ( false ) ;
150+ comp . isLoading = false ;
151151 fixture . detectChanges ( ) ;
152152 expect ( fixture . debugElement . query ( By . css ( 'div.thumbnail-placeholder' ) ) ) . toBeTruthy ( ) ;
153153 } ) ;
@@ -243,14 +243,14 @@ describe('ThumbnailComponent', () => {
243243 describe ( 'fallback' , ( ) => {
244244 describe ( 'if there is a default image' , ( ) => {
245245 it ( 'should display the default image' , ( ) => {
246- comp . src$ . next ( 'http://bit.stream' ) ;
246+ comp . src = 'http://bit.stream' ;
247247 comp . defaultImage = 'http://default.img' ;
248248 comp . errorHandler ( ) ;
249- expect ( comp . src$ . getValue ( ) ) . toBe ( comp . defaultImage ) ;
249+ expect ( comp . src ) . toBe ( comp . defaultImage ) ;
250250 } ) ;
251251
252252 it ( 'should include the alt text' , ( ) => {
253- comp . src$ . next ( 'http://bit.stream' ) ;
253+ comp . src = 'http://bit.stream' ;
254254 comp . defaultImage = 'http://default.img' ;
255255 comp . errorHandler ( ) ;
256256
@@ -262,10 +262,10 @@ describe('ThumbnailComponent', () => {
262262
263263 describe ( 'if there is no default image' , ( ) => {
264264 it ( 'should display the HTML placeholder' , ( ) => {
265- comp . src$ . next ( 'http://default.img' ) ;
265+ comp . src = 'http://default.img' ;
266266 comp . defaultImage = null ;
267267 comp . errorHandler ( ) ;
268- expect ( comp . src$ . getValue ( ) ) . toBe ( null ) ;
268+ expect ( comp . src ) . toBe ( null ) ;
269269
270270 fixture . detectChanges ( ) ;
271271 const placeholder = fixture . debugElement . query ( By . css ( 'div.thumbnail-placeholder' ) ) . nativeElement ;
@@ -357,7 +357,7 @@ describe('ThumbnailComponent', () => {
357357 it ( 'should show the default image' , ( ) => {
358358 comp . defaultImage = 'default/image.jpg' ;
359359 comp . ngOnChanges ( { } ) ;
360- expect ( comp . src$ . getValue ( ) ) . toBe ( 'default/image.jpg' ) ;
360+ expect ( comp . src ) . toBe ( 'default/image.jpg' ) ;
361361 } ) ;
362362 } ) ;
363363 } ) ;
0 commit comments