@@ -303,21 +303,25 @@ describe('<md-virtual-repeat>', function() {
303
303
$$rAF . flush ( ) ;
304
304
305
305
expect ( container [ 0 ] . offsetHeight ) . toBe ( 100 ) ;
306
+ expect ( offsetter . children ( ) . length ) . toBe ( 13 ) ;
306
307
307
308
// With 5 items...
308
309
scope . items = createItems ( 5 ) ;
309
310
scope . $apply ( ) ;
310
311
expect ( container [ 0 ] . offsetHeight ) . toBe ( 5 * ITEM_SIZE ) ;
312
+ expect ( offsetter . children ( ) . length ) . toBe ( 5 ) ;
311
313
312
314
// With 0 items...
313
315
scope . items = [ ] ;
314
316
scope . $apply ( ) ;
315
317
expect ( container [ 0 ] . offsetHeight ) . toBe ( 0 ) ;
318
+ expect ( offsetter . children ( ) . length ) . toBe ( 0 ) ;
316
319
317
320
// With lots of items again...
318
321
scope . items = createItems ( NUM_ITEMS ) ;
319
322
scope . $apply ( ) ;
320
323
expect ( container [ 0 ] . offsetHeight ) . toBe ( 100 ) ;
324
+ expect ( offsetter . children ( ) . length ) . toBe ( 13 ) ;
321
325
} ) ;
322
326
323
327
it ( 'should shrink the container when the number of items goes down (horizontal)' , function ( ) {
@@ -331,21 +335,25 @@ describe('<md-virtual-repeat>', function() {
331
335
$$rAF . flush ( ) ;
332
336
333
337
expect ( container [ 0 ] . offsetWidth ) . toBe ( 150 ) ;
338
+ expect ( offsetter . children ( ) . length ) . toBe ( 18 ) ;
334
339
335
340
// With 5 items...
336
341
scope . items = createItems ( 5 ) ;
337
342
scope . $apply ( ) ;
338
343
expect ( container [ 0 ] . offsetWidth ) . toBe ( 5 * ITEM_SIZE ) ;
344
+ expect ( offsetter . children ( ) . length ) . toBe ( 5 ) ;
339
345
340
346
// With 0 items...
341
347
scope . items = [ ] ;
342
348
scope . $apply ( ) ;
343
349
expect ( container [ 0 ] . offsetWidth ) . toBe ( 0 ) ;
350
+ expect ( offsetter . children ( ) . length ) . toBe ( 0 ) ;
344
351
345
352
// With lots of items again...
346
353
scope . items = createItems ( NUM_ITEMS ) ;
347
354
scope . $apply ( ) ;
348
355
expect ( container [ 0 ] . offsetWidth ) . toBe ( 150 ) ;
356
+ expect ( offsetter . children ( ) . length ) . toBe ( 18 ) ;
349
357
} ) ;
350
358
351
359
it ( 'should not shrink below the specified md-auto-shrink-min (vertical)' , function ( ) {
0 commit comments