@@ -312,6 +312,15 @@ YUI.add('ez-universaldiscoveryfinderexplorerlevelview-tests', function (Y) {
312
312
Assert . areSame ( this . view . get ( 'items' ) [ 0 ] . contentType , this . result . contentType , 'item should have a location' ) ;
313
313
Assert . areSame ( this . view . get ( 'items' ) [ 0 ] . contentInfo , this . result . location . get ( 'contentInfo' ) , 'item should have a location' ) ;
314
314
} ,
315
+
316
+ "Should remove loading after updating items" : function ( ) {
317
+ var container = this . view . get ( 'container' ) ;
318
+
319
+ container . addClass ( 'is-loading' ) ;
320
+ this . view . set ( 'items' , this . searchResult ) ;
321
+
322
+ Assert . isFalse ( container . hasClass ( 'is-loading' ) , 'Should have the loading icon' ) ;
323
+ } ,
315
324
} ) ;
316
325
317
326
scrollTest = new Y . Test . Case ( {
@@ -462,24 +471,11 @@ YUI.add('ez-universaldiscoveryfinderexplorerlevelview-tests', function (Y) {
462
471
delete this . view ;
463
472
} ,
464
473
465
- "Should set items to null and add loading class on reset" : function ( ) {
466
- var container = this . view . get ( 'container' ) ;
467
-
474
+ "Should set items to null on reset" : function ( ) {
468
475
this . view . set ( 'items' , this . searchResult ) ;
469
476
this . view . reset ( ) ;
470
- Assert . isTrue ( container . hasClass ( 'is-loading' ) , 'Should have the loading icon' ) ;
471
477
Assert . isNull ( this . view . get ( 'items' ) , 'items attribute should be resetted' ) ;
472
478
} ,
473
-
474
- "Should add loading class when setting items to null" : function ( ) {
475
- var container = this . view . get ( 'container' ) ;
476
-
477
- this . view . set ( 'items' , this . searchResult ) ;
478
- Assert . isFalse ( container . hasClass ( 'is-loading' ) , 'Should NOT have the loading icon' ) ;
479
-
480
- this . view . set ( 'items' , null ) ;
481
- Assert . isTrue ( container . hasClass ( 'is-loading' ) , 'Should have the loading icon' ) ;
482
- } ,
483
479
} ) ;
484
480
485
481
Y . Test . Runner . setName ( "eZ Universal Discovery Finder Explorer Level View tests" ) ;
0 commit comments