@@ -152,10 +152,12 @@ describe('ThumbnailComponent', () => {
152152 expect ( thumbnail ) . toBeTruthy ( ) ;
153153 } ) ) ;
154154
155- it ( 'should show default thumbnail' , ( ) => {
156- expect ( component . default ) . toBe ( 'assets/images/file-placeholder.svg' ) ;
155+ it ( 'should show default thumbnail' , ( done ) => {
156+ component . default$ . subscribe ( image => {
157+ expect ( image ) . toBe ( 'assets/images/file-placeholder.svg' ) ;
158+ done ( ) ;
159+ } ) ;
157160 } ) ;
158-
159161 } ) ;
160162
161163 describe ( 'When bitstreams are only original' , ( ) => {
@@ -172,10 +174,12 @@ describe('ThumbnailComponent', () => {
172174 expect ( thumbnail ) . toBeTruthy ( ) ;
173175 } ) ) ;
174176
175- it ( 'should show default thumbnail' , ( ) => {
176- expect ( component . default ) . toBe ( 'assets/images/file-placeholder.svg' ) ;
177+ it ( 'should show default thumbnail' , ( done ) => {
178+ component . default$ . subscribe ( image => {
179+ expect ( image ) . toBe ( 'assets/images/file-placeholder.svg' ) ;
180+ done ( ) ;
181+ } ) ;
177182 } ) ;
178-
179183 } ) ;
180184
181185 describe ( 'When bitstreams are only thumbnail' , ( ) => {
@@ -239,10 +243,12 @@ describe('ThumbnailComponent', () => {
239243 expect ( thumbnail ) . toBeTruthy ( ) ;
240244 } ) ;
241245
242- it ( 'should show default thumbnail' , ( ) => {
243- expect ( component . default ) . toBe ( 'assets/images/file-placeholder.svg' ) ;
246+ it ( 'should show default thumbnail' , ( done ) => {
247+ component . default$ . subscribe ( image => {
248+ expect ( image ) . toBe ( 'assets/images/file-placeholder.svg' ) ;
249+ done ( ) ;
250+ } ) ;
244251 } ) ;
245-
246252 } ) ;
247253
248254 describe ( 'When bitstreams are only original without the right metadata information' , ( ) => {
@@ -254,8 +260,11 @@ describe('ThumbnailComponent', () => {
254260 fixture . detectChanges ( ) ;
255261 } ) ;
256262
257- it ( 'should not show bitstream content image src but the default image' , ( ) => {
258- expect ( component . default ) . toBe ( 'assets/images/file-placeholder.svg' ) ;
263+ it ( 'should not show bitstream content image src but the default image' , ( done ) => {
264+ component . default$ . subscribe ( image => {
265+ expect ( image ) . toBe ( 'assets/images/file-placeholder.svg' ) ;
266+ done ( ) ;
267+ } ) ;
259268 } ) ;
260269
261270 } ) ;
@@ -269,10 +278,12 @@ describe('ThumbnailComponent', () => {
269278 fixture . detectChanges ( ) ;
270279 } ) ;
271280
272- it ( 'should not show thumbnail content image src but the default image' , ( ) => {
273- expect ( component . default ) . toBe ( 'assets/images/file-placeholder.svg' ) ;
281+ it ( 'should not show thumbnail content image src but the default image' , ( done ) => {
282+ component . default$ . subscribe ( image => {
283+ expect ( image ) . toBe ( 'assets/images/file-placeholder.svg' ) ;
284+ done ( ) ;
285+ } ) ;
274286 } ) ;
275-
276287 } ) ;
277288
278289 describe ( 'When bitstreams are only original with the right metadata information' , ( ) => {
@@ -284,8 +295,11 @@ describe('ThumbnailComponent', () => {
284295 fixture . detectChanges ( ) ;
285296 } ) ;
286297
287- it ( 'should not show thumbnail content image src but the default image' , ( ) => {
288- expect ( component . default ) . toBe ( 'assets/images/file-placeholder.svg' ) ;
298+ it ( 'should not show thumbnail content image src but the default image' , ( done ) => {
299+ component . default$ . subscribe ( image => {
300+ expect ( image ) . toBe ( 'assets/images/file-placeholder.svg' ) ;
301+ done ( ) ;
302+ } ) ;
289303 } ) ;
290304
291305 } ) ;
0 commit comments