@@ -144,6 +144,7 @@ describe('ui-select tests', function() {
144
144
var choicesContainerEl = $ ( el ) . find ( '.ui-select-choices' ) ;
145
145
expect ( choicesContainerEl . length ) . toEqual ( 1 ) ;
146
146
147
+ openDropdown ( el ) ;
147
148
var choicesEls = $ ( el ) . find ( '.ui-select-choices-row' ) ;
148
149
expect ( choicesEls . length ) . toEqual ( 8 ) ;
149
150
} ) ;
@@ -367,12 +368,14 @@ describe('ui-select tests', function() {
367
368
} ) ;
368
369
369
370
it ( 'should set a disabled class on the option' , function ( ) {
370
- var option = $ ( this . el ) . find ( '.ui-select-choices-row div:contains("Wladimir")' ) ;
371
- var container = option . closest ( '.ui-select-choices-row' ) ;
372
371
373
372
openDropdown ( this . el ) ;
374
373
374
+ var option = $ ( this . el ) . find ( '.ui-select-choices-row div:contains("Wladimir")' ) ;
375
+ var container = option . closest ( '.ui-select-choices-row' ) ;
376
+
375
377
expect ( container . hasClass ( 'disabled' ) ) . toBeTruthy ( ) ;
378
+
376
379
} ) ;
377
380
} ) ;
378
381
@@ -398,11 +401,11 @@ describe('ui-select tests', function() {
398
401
} ) ;
399
402
400
403
it ( 'should set a disabled class on the option' , function ( ) {
404
+ openDropdown ( this . el ) ;
405
+
401
406
var option = $ ( this . el ) . find ( '.ui-select-choices-row div:contains("Wladimir")' ) ;
402
407
var container = option . closest ( '.ui-select-choices-row' ) ;
403
408
404
- openDropdown ( this . el ) ;
405
-
406
409
expect ( container . hasClass ( 'disabled' ) ) . toBeTruthy ( ) ;
407
410
} ) ;
408
411
} ) ;
@@ -429,11 +432,11 @@ describe('ui-select tests', function() {
429
432
} ) ;
430
433
431
434
it ( 'should set a disabled class on the option' , function ( ) {
435
+ openDropdown ( this . el ) ;
436
+
432
437
var option = $ ( this . el ) . find ( '.ui-select-choices-row div:contains("Wladimir")' ) ;
433
438
var container = option . closest ( '.ui-select-choices-row' ) ;
434
439
435
- openDropdown ( this . el ) ;
436
-
437
440
expect ( container . hasClass ( 'disabled' ) ) . toBeTruthy ( ) ;
438
441
} ) ;
439
442
} ) ;
@@ -485,9 +488,8 @@ describe('ui-select tests', function() {
485
488
var el = createUiSelect ( ) ;
486
489
el . scope ( ) . $select . search = 't' ;
487
490
scope . $digest ( ) ;
488
- var choices = el . find ( '.ui-select-choices-row' ) ;
489
-
490
491
openDropdown ( el ) ;
492
+ var choices = el . find ( '.ui-select-choices-row' ) ;
491
493
492
494
expect ( choices . eq ( 0 ) ) . toHaveClass ( 'active' ) ;
493
495
expect ( getGroupLabel ( choices . eq ( 0 ) ) . text ( ) ) . toBe ( 'Foo' ) ;
@@ -844,6 +846,7 @@ describe('ui-select tests', function() {
844
846
</ui-select>'
845
847
) ;
846
848
849
+ openDropdown ( el ) ;
847
850
expect ( $ ( el ) . find ( '.only-once' ) . length ) . toEqual ( 1 ) ;
848
851
849
852
0 commit comments