@@ -412,21 +412,21 @@ describe('ui-select tests', function() {
412
412
expect ( getMatchLabel ( el ) ) . toEqual ( 'Samantha' ) ;
413
413
} ) ;
414
414
415
- it ( 'should correctly render initial state with track by $index' , function ( ) {
416
-
417
- var el = compileTemplate (
418
- '<ui-select ng-model="selection.selected"> \
419
- <ui-select-match placeholder="Pick one...">{{$select.selected.name}}</ui-select-match> \
420
- <ui-select-choices repeat="person in people track by $index"> \
421
- {{person.email}} \
422
- </ui-select-choices> \
423
- </ui-select>'
424
- ) ;
425
-
426
- openDropdown ( el ) ;
427
-
428
- var generatedId = el . scope ( ) . $select . generatedId ;
429
- expect ( $ ( el ) . find ( '[id="ui-select-choices-row-' + generatedId + '-0"]' ) . length ) . toEqual ( 1 ) ;
415
+ it ( 'should correctly render initial state with track by $index' , function ( ) {
416
+
417
+ var el = compileTemplate (
418
+ '<ui-select ng-model="selection.selected"> \
419
+ <ui-select-match placeholder="Pick one...">{{$select.selected.name}}</ui-select-match> \
420
+ <ui-select-choices repeat="person in people track by $index"> \
421
+ {{person.email}} \
422
+ </ui-select-choices> \
423
+ </ui-select>'
424
+ ) ;
425
+
426
+ openDropdown ( el ) ;
427
+
428
+ var generatedId = el . scope ( ) . $select . generatedId ;
429
+ expect ( $ ( el ) . find ( '[id="ui-select-choices-row-' + generatedId + '-0"]' ) . length ) . toEqual ( 1 ) ;
430
430
} ) ;
431
431
432
432
it ( 'should utilize wrapper directive ng-model' , function ( ) {
@@ -1607,42 +1607,42 @@ describe('ui-select tests', function() {
1607
1607
expect ( el . find ( '.ui-select-match-item' ) . length ) . toBe ( 0 ) ;
1608
1608
} ) ;
1609
1609
1610
- it ( 'should render intial state with data-multiple attribute' , function ( ) {
1611
- // ensure match template has been loaded by having more than one selection
1612
- scope . selection . selectedMultiple = [ scope . people [ 0 ] , scope . people [ 1 ] ] ;
1613
-
1610
+ it ( 'should render intial state with data-multiple attribute' , function ( ) {
1611
+ // ensure match template has been loaded by having more than one selection
1612
+ scope . selection . selectedMultiple = [ scope . people [ 0 ] , scope . people [ 1 ] ] ;
1613
+
1614
1614
var el = compileTemplate (
1615
1615
'<ui-select data-multiple ng-model="selection.selectedMultiple" theme="bootstrap" style="width: 800px;"> \
1616
1616
<ui-select-match placeholder="Pick one...">{{$item.name}} <{{$item.email}}></ui-select-match> \
1617
1617
<ui-select-choices repeat="person in people | filter: $select.search"> \
1618
1618
<div ng-bind-html="person.name | highlight: $select.search"></div> \
1619
1619
<div ng-bind-html="person.email | highlight: $select.search"></div> \
1620
1620
</ui-select-choices> \
1621
- </ui-select>'
1622
- ) ;
1623
-
1621
+ </ui-select>'
1622
+ ) ;
1623
+
1624
1624
expect ( el ) . toHaveClass ( 'ui-select-multiple' ) ;
1625
1625
expect ( el . scope ( ) . $select . selected . length ) . toBe ( 2 ) ;
1626
- expect ( el . find ( '.ui-select-match-item' ) . length ) . toBe ( 2 ) ;
1626
+ expect ( el . find ( '.ui-select-match-item' ) . length ) . toBe ( 2 ) ;
1627
1627
} ) ;
1628
1628
1629
- it ( 'should render intial state with x-multiple attribute' , function ( ) {
1630
- // ensure match template has been loaded by having more than one selection
1631
- scope . selection . selectedMultiple = [ scope . people [ 0 ] , scope . people [ 1 ] ] ;
1632
-
1629
+ it ( 'should render intial state with x-multiple attribute' , function ( ) {
1630
+ // ensure match template has been loaded by having more than one selection
1631
+ scope . selection . selectedMultiple = [ scope . people [ 0 ] , scope . people [ 1 ] ] ;
1632
+
1633
1633
var el = compileTemplate (
1634
1634
'<ui-select x-multiple ng-model="selection.selectedMultiple" theme="bootstrap" style="width: 800px;"> \
1635
1635
<ui-select-match placeholder="Pick one...">{{$item.name}} <{{$item.email}}></ui-select-match> \
1636
1636
<ui-select-choices repeat="person in people | filter: $select.search"> \
1637
1637
<div ng-bind-html="person.name | highlight: $select.search"></div> \
1638
1638
<div ng-bind-html="person.email | highlight: $select.search"></div> \
1639
1639
</ui-select-choices> \
1640
- </ui-select>'
1641
- ) ;
1642
-
1640
+ </ui-select>'
1641
+ ) ;
1642
+
1643
1643
expect ( el ) . toHaveClass ( 'ui-select-multiple' ) ;
1644
1644
expect ( el . scope ( ) . $select . selected . length ) . toBe ( 2 ) ;
1645
- expect ( el . find ( '.ui-select-match-item' ) . length ) . toBe ( 2 ) ;
1645
+ expect ( el . find ( '.ui-select-match-item' ) . length ) . toBe ( 2 ) ;
1646
1646
} ) ;
1647
1647
1648
1648
it ( 'should set model as an empty array if ngModel isnt defined after an item is selected' , function ( ) {
0 commit comments