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 () {
18821882 if ( attrs . refreshDelay !== undefined ) { choicesAttrsHtml += ' refresh-delay="' + attrs . refreshDelay + '"' ; }
18831883 if ( attrs . spinnerEnabled !== undefined ) { attrsHtml += ' spinner-enabled="' + attrs . spinnerEnabled + '"' ; }
18841884 if ( attrs . spinnerClass !== undefined ) { attrsHtml += ' spinner-class="' + attrs . spinnerClass + '"' ; }
1885+ if ( attrs . uiSelectHeaderGroupSelectable !== undefined ) { choicesAttrsHtml += ' ui-select-header-group-selectable' ; }
18851886 }
18861887
18871888 return compileTemplate (
@@ -3054,6 +3055,23 @@ describe('ui-select tests', function () {
30543055 expect ( el . scope ( ) . $select . spinnerClass ) . toBe ( 'randomclass' ) ;
30553056 } ) ;
30563057 } ) ;
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+ } )
30573075 } ) ;
30583076
30593077 it ( 'should add an id to the search input field' , function ( ) {
You can’t perform that action at this time.
0 commit comments