@@ -99,32 +99,32 @@ describe('ThumbnailComponent', () => {
9999 } ) ;
100100
101101 describe ( 'loading' , ( ) => {
102- it ( 'should start out with isLoading$ true' , ( ) => {
103- expect ( comp . isLoading$ . getValue ( ) ) . toBeTrue ( ) ;
102+ it ( 'should start out with isLoading true' , ( ) => {
103+ expect ( comp . isLoading ( ) ) . toBeTrue ( ) ;
104104 } ) ;
105105
106106 it ( 'should set isLoading$ to false once an image is successfully loaded' , ( ) => {
107107 comp . setSrc ( 'http://bit.stream' ) ;
108108 fixture . debugElement . query ( By . css ( 'img.thumbnail-content' ) ) . triggerEventHandler ( 'load' , new Event ( 'load' ) ) ;
109- expect ( comp . isLoading$ . getValue ( ) ) . toBeFalse ( ) ;
109+ expect ( comp . isLoading ( ) ) . toBeFalse ( ) ;
110110 } ) ;
111111
112112 it ( 'should set isLoading$ to false once the src is set to null' , ( ) => {
113113 comp . setSrc ( null ) ;
114- expect ( comp . isLoading$ . getValue ( ) ) . toBeFalse ( ) ;
114+ expect ( comp . isLoading ( ) ) . toBeFalse ( ) ;
115115 } ) ;
116116
117117 it ( 'should show a loading animation while isLoading$ is true' , ( ) => {
118118 expect ( de . query ( By . css ( 'ds-loading' ) ) ) . toBeTruthy ( ) ;
119119
120- comp . isLoading$ . next ( false ) ;
120+ comp . isLoading . set ( false ) ;
121121 fixture . detectChanges ( ) ;
122122 expect ( fixture . debugElement . query ( By . css ( 'ds-loading' ) ) ) . toBeFalsy ( ) ;
123123 } ) ;
124124
125125 describe ( 'with a thumbnail image' , ( ) => {
126126 beforeEach ( ( ) => {
127- comp . src$ . next ( 'https://bit.stream' ) ;
127+ comp . src . set ( 'https://bit.stream' ) ;
128128 fixture . detectChanges ( ) ;
129129 } ) ;
130130
@@ -133,7 +133,7 @@ describe('ThumbnailComponent', () => {
133133 expect ( img ) . toBeTruthy ( ) ;
134134 expect ( img . classes [ 'd-none' ] ) . toBeTrue ( ) ;
135135
136- comp . isLoading$ . next ( false ) ;
136+ comp . isLoading . set ( false ) ;
137137 fixture . detectChanges ( ) ;
138138 img = fixture . debugElement . query ( By . css ( 'img.thumbnail-content' ) ) ;
139139 expect ( img ) . toBeTruthy ( ) ;
@@ -144,14 +144,14 @@ describe('ThumbnailComponent', () => {
144144
145145 describe ( 'without a thumbnail image' , ( ) => {
146146 beforeEach ( ( ) => {
147- comp . src$ . next ( null ) ;
147+ comp . src . set ( null ) ;
148148 fixture . detectChanges ( ) ;
149149 } ) ;
150150
151151 it ( 'should only show the HTML placeholder once done loading' , ( ) => {
152152 expect ( fixture . debugElement . query ( By . css ( 'div.thumbnail-placeholder' ) ) ) . toBeFalsy ( ) ;
153153
154- comp . isLoading$ . next ( false ) ;
154+ comp . isLoading . set ( false ) ;
155155 fixture . detectChanges ( ) ;
156156 expect ( fixture . debugElement . query ( By . css ( 'div.thumbnail-placeholder' ) ) ) . toBeTruthy ( ) ;
157157 } ) ;
@@ -247,14 +247,14 @@ describe('ThumbnailComponent', () => {
247247 describe ( 'fallback' , ( ) => {
248248 describe ( 'if there is a default image' , ( ) => {
249249 it ( 'should display the default image' , ( ) => {
250- comp . src$ . next ( 'http://bit.stream' ) ;
250+ comp . src . set ( 'http://bit.stream' ) ;
251251 comp . defaultImage = 'http://default.img' ;
252252 comp . errorHandler ( ) ;
253- expect ( comp . src$ . getValue ( ) ) . toBe ( comp . defaultImage ) ;
253+ expect ( comp . src ( ) ) . toBe ( comp . defaultImage ) ;
254254 } ) ;
255255
256256 it ( 'should include the alt text' , ( ) => {
257- comp . src$ . next ( 'http://bit.stream' ) ;
257+ comp . src . set ( 'http://bit.stream' ) ;
258258 comp . defaultImage = 'http://default.img' ;
259259 comp . errorHandler ( ) ;
260260
@@ -266,10 +266,10 @@ describe('ThumbnailComponent', () => {
266266
267267 describe ( 'if there is no default image' , ( ) => {
268268 it ( 'should display the HTML placeholder' , ( ) => {
269- comp . src$ . next ( 'http://default.img' ) ;
269+ comp . src . set ( 'http://default.img' ) ;
270270 comp . defaultImage = null ;
271271 comp . errorHandler ( ) ;
272- expect ( comp . src$ . getValue ( ) ) . toBe ( null ) ;
272+ expect ( comp . src ( ) ) . toBe ( null ) ;
273273
274274 fixture . detectChanges ( ) ;
275275 const placeholder = fixture . debugElement . query ( By . css ( 'div.thumbnail-placeholder' ) ) . nativeElement ;
@@ -363,7 +363,7 @@ describe('ThumbnailComponent', () => {
363363 it ( 'should show the default image' , ( ) => {
364364 comp . defaultImage = 'default/image.jpg' ;
365365 comp . ngOnChanges ( { } ) ;
366- expect ( comp . src$ . getValue ( ) ) . toBe ( 'default/image.jpg' ) ;
366+ expect ( comp . src ( ) ) . toBe ( 'default/image.jpg' ) ;
367367 } ) ;
368368 } ) ;
369369 } ) ;
@@ -419,7 +419,7 @@ describe('ThumbnailComponent', () => {
419419 } ) ;
420420
421421 it ( 'should start out with isLoading$ true' , ( ) => {
422- expect ( comp . isLoading$ . getValue ( ) ) . toBeTrue ( ) ;
422+ expect ( comp . isLoading ( ) ) . toBeTrue ( ) ;
423423 expect ( de . query ( By . css ( 'ds-loading' ) ) ) . toBeTruthy ( ) ;
424424 } ) ;
425425
0 commit comments