@@ -253,7 +253,7 @@ describe('ui-select tests', function() {
253
253
expect ( isDropdownOpened ( el2 ) ) . toEqual ( true ) ;
254
254
255
255
var el3 = createUiSelect ( ) ;
256
- expect ( el3 . scope ( ) . $select . disabled ) . toEqual ( false ) ;
256
+ expect ( el3 . scope ( ) . $select . disabled ) . toBeFalsy ( ) ;
257
257
clickMatch ( el3 ) ;
258
258
expect ( isDropdownOpened ( el3 ) ) . toEqual ( true ) ;
259
259
} ) ;
@@ -724,6 +724,35 @@ describe('ui-select tests', function() {
724
724
725
725
} ) ;
726
726
727
+ it ( 'should invoke hover callback' , function ( ) {
728
+
729
+ var highlighted ;
730
+ scope . onHighlightFn = function ( $item ) {
731
+ highlighted = $item ;
732
+ } ;
733
+
734
+ var el = compileTemplate (
735
+ '<ui-select on-select="onSelectFn($item, $model)" ng-model="selection.selected"> \
736
+ <ui-select-match placeholder="Pick one...">{{$select.selected.name}}</ui-select-match> \
737
+ <ui-select-choices on-highlight="onHighlightFn(person)" repeat="person.name as person in people | filter: $select.search"> \
738
+ <div ng-bind-html="person.name | highlight: $select.search"></div> \
739
+ <div ng-bind-html="person.email | highlight: $select.search"></div> \
740
+ </ui-select-choices> \
741
+ </ui-select>'
742
+ ) ;
743
+
744
+ expect ( highlighted ) . toBeFalsy ( ) ;
745
+
746
+ if ( ! isDropdownOpened ( el ) ) {
747
+ openDropdown ( el ) ;
748
+ }
749
+
750
+ $ ( el ) . find ( '.ui-select-choices-row div:contains("Samantha")' ) . trigger ( 'mouseover' ) ;
751
+ scope . $digest ( ) ;
752
+
753
+ expect ( highlighted ) . toBe ( scope . people [ 5 ] ) ;
754
+ } )
755
+
727
756
it ( 'should set $item & $model correctly when invoking callback on select and no single prop. binding' , function ( ) {
728
757
729
758
scope . onSelectFn = function ( $item , $model , $label ) {
0 commit comments