@@ -412,21 +412,21 @@ describe('ui-select tests', function() {
412412 expect ( getMatchLabel ( el ) ) . toEqual ( 'Samantha' ) ;
413413 } ) ;
414414
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 ) ;
430430 } ) ;
431431
432432 it ( 'should utilize wrapper directive ng-model' , function ( ) {
@@ -1607,42 +1607,42 @@ describe('ui-select tests', function() {
16071607 expect ( el . find ( '.ui-select-match-item' ) . length ) . toBe ( 0 ) ;
16081608 } ) ;
16091609
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+
16141614 var el = compileTemplate (
16151615 '<ui-select data-multiple ng-model="selection.selectedMultiple" theme="bootstrap" style="width: 800px;"> \
16161616 <ui-select-match placeholder="Pick one...">{{$item.name}} <{{$item.email}}></ui-select-match> \
16171617 <ui-select-choices repeat="person in people | filter: $select.search"> \
16181618 <div ng-bind-html="person.name | highlight: $select.search"></div> \
16191619 <div ng-bind-html="person.email | highlight: $select.search"></div> \
16201620 </ui-select-choices> \
1621- </ui-select>'
1622- ) ;
1623-
1621+ </ui-select>'
1622+ ) ;
1623+
16241624 expect ( el ) . toHaveClass ( 'ui-select-multiple' ) ;
16251625 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 ) ;
16271627 } ) ;
16281628
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+
16331633 var el = compileTemplate (
16341634 '<ui-select x-multiple ng-model="selection.selectedMultiple" theme="bootstrap" style="width: 800px;"> \
16351635 <ui-select-match placeholder="Pick one...">{{$item.name}} <{{$item.email}}></ui-select-match> \
16361636 <ui-select-choices repeat="person in people | filter: $select.search"> \
16371637 <div ng-bind-html="person.name | highlight: $select.search"></div> \
16381638 <div ng-bind-html="person.email | highlight: $select.search"></div> \
16391639 </ui-select-choices> \
1640- </ui-select>'
1641- ) ;
1642-
1640+ </ui-select>'
1641+ ) ;
1642+
16431643 expect ( el ) . toHaveClass ( 'ui-select-multiple' ) ;
16441644 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 ) ;
16461646 } ) ;
16471647
16481648 it ( 'should set model as an empty array if ngModel isnt defined after an item is selected' , function ( ) {
0 commit comments