@@ -880,42 +880,6 @@ describe('CdkOption and CdkListbox', () => {
880
880
expect ( comboboxInstance . isOpen ( ) ) . toBeTrue ( ) ;
881
881
expect ( comboboxInstance . value ) . toBeUndefined ( ) ;
882
882
} ) ;
883
-
884
- it ( 'should not update combobox if the listbox or option is disabled' , ( ) => {
885
- expect ( comboboxInstance . value ) . toBeUndefined ( ) ;
886
- expect ( comboboxInstance . isOpen ( ) ) . toBeFalse ( ) ;
887
-
888
- dispatchMouseEvent ( comboboxElement , 'click' ) ;
889
- fixture . detectChanges ( ) ;
890
-
891
- listbox = fixture . debugElement . query ( By . directive ( CdkListbox ) ) ;
892
- listboxInstance = listbox . injector . get < CdkListbox < unknown > > ( CdkListbox ) ;
893
- listboxElement = listbox . nativeElement ;
894
-
895
- options = fixture . debugElement . queryAll ( By . directive ( CdkOption ) ) ;
896
- optionInstances = options . map ( o => o . injector . get < CdkOption > ( CdkOption ) ) ;
897
- optionElements = options . map ( o => o . nativeElement ) ;
898
-
899
- expect ( comboboxInstance . isOpen ( ) ) . toBeTrue ( ) ;
900
- testComponent . isDisabled = true ;
901
- fixture . detectChanges ( ) ;
902
-
903
- dispatchMouseEvent ( optionElements [ 0 ] , 'click' ) ;
904
- fixture . detectChanges ( ) ;
905
-
906
- expect ( comboboxInstance . isOpen ( ) ) . toBeTrue ( ) ;
907
- expect ( comboboxInstance . value ) . toBeUndefined ( ) ;
908
-
909
- testComponent . isDisabled = false ;
910
- optionInstances [ 0 ] . disabled = true ;
911
- fixture . detectChanges ( ) ;
912
-
913
- dispatchMouseEvent ( optionElements [ 0 ] , 'click' ) ;
914
- fixture . detectChanges ( ) ;
915
-
916
- expect ( comboboxInstance . isOpen ( ) ) . toBeTrue ( ) ;
917
- expect ( comboboxInstance . value ) . toBeUndefined ( ) ;
918
- } ) ;
919
883
} ) ;
920
884
} ) ;
921
885
@@ -1022,7 +986,7 @@ class ListboxControlValueAccessor {
1022
986
template : `
1023
987
<button cdkCombobox #toggleCombobox class="example-combobox"
1024
988
[cdkComboboxTriggerFor]="panel"
1025
- [openActions]="'focus '">
989
+ [openActions]="'click '">
1026
990
No Value
1027
991
</button>
1028
992
0 commit comments