This repository was archived by the owner on Oct 2, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -1882,6 +1882,7 @@ describe('ui-select tests', function () {
1882
1882
if ( attrs . refreshDelay !== undefined ) { choicesAttrsHtml += ' refresh-delay="' + attrs . refreshDelay + '"' ; }
1883
1883
if ( attrs . spinnerEnabled !== undefined ) { attrsHtml += ' spinner-enabled="' + attrs . spinnerEnabled + '"' ; }
1884
1884
if ( attrs . spinnerClass !== undefined ) { attrsHtml += ' spinner-class="' + attrs . spinnerClass + '"' ; }
1885
+ if ( attrs . uiSelectHeaderGroupSelectable !== undefined ) { choicesAttrsHtml += ' ui-select-header-group-selectable' ; }
1885
1886
}
1886
1887
1887
1888
return compileTemplate (
@@ -3054,6 +3055,23 @@ describe('ui-select tests', function () {
3054
3055
expect ( el . scope ( ) . $select . spinnerClass ) . toBe ( 'randomclass' ) ;
3055
3056
} ) ;
3056
3057
} ) ;
3058
+
3059
+ describe ( 'uiSelectHeaderGroupSelectable directive' , function ( ) {
3060
+ it ( 'should have a default value of false' , function ( ) {
3061
+ var el = createUiSelectMultiple ( { groupBy : "'age'" , uiSelectHeaderGroupSelectable : true } ) ;
3062
+ var ctrl = el . scope ( ) . $select ;
3063
+
3064
+ showChoicesForSearch ( el , '' ) ;
3065
+ expect ( ctrl . multiple ) . toEqual ( true ) ;
3066
+ expect ( ctrl . groups . length ) . toEqual ( 5 ) ;
3067
+ openDropdown ( el ) ;
3068
+
3069
+ $ ( el ) . find ( 'div.ui-select-header-group-selectable' ) . first ( ) . click ( ) ;
3070
+ showChoicesForSearch ( el , '' ) ;
3071
+
3072
+ expect ( ctrl . selected . length ) . toEqual ( 2 ) ;
3073
+ } ) ;
3074
+ } )
3057
3075
} ) ;
3058
3076
3059
3077
it ( 'should add an id to the search input field' , function ( ) {
You can’t perform that action at this time.
0 commit comments