@@ -895,6 +895,21 @@ describe('IgxSimpleCombo', () => {
895
895
expect ( combo . selection . length ) . toEqual ( 0 ) ;
896
896
} ) ;
897
897
898
+ it ( 'should not clear selection on tab/blur after filtering and selecting a value' , ( ) => {
899
+ UIInteractions . simulateTyping ( 'con' , input ) ;
900
+ expect ( combo . comboInput . value ) . toEqual ( 'con' ) ;
901
+ fixture . detectChanges ( ) ;
902
+
903
+ UIInteractions . triggerKeyDownEvtUponElem ( 'Enter' , input . nativeElement ) ;
904
+ expect ( combo . selection . length ) . toEqual ( 1 ) ;
905
+ expect ( combo . value ) . toEqual ( 'Wisconsin' ) ;
906
+
907
+ UIInteractions . triggerEventHandlerKeyDown ( 'Tab' , input ) ;
908
+ fixture . detectChanges ( ) ;
909
+ expect ( combo . selection . length ) . toEqual ( 1 ) ;
910
+ expect ( combo . value ) . toEqual ( 'Wisconsin' ) ;
911
+ } ) ;
912
+
898
913
it ( 'should display the AddItem button when allowCustomValues is true and there is a partial match' , fakeAsync ( ( ) => {
899
914
fixture . componentInstance . allowCustomValues = true ;
900
915
fixture . detectChanges ( ) ;
@@ -1118,7 +1133,7 @@ describe('IgxSimpleCombo', () => {
1118
1133
1119
1134
item1 . triggerEventHandler ( 'click' , UIInteractions . getMouseEvent ( 'click' ) ) ;
1120
1135
fixture . detectChanges ( ) ;
1121
- expect ( combo . value ) . toBe ( null ) ;
1136
+ expect ( combo . value ) . toBe ( '' ) ;
1122
1137
1123
1138
combo . open ( ) ;
1124
1139
fixture . detectChanges ( ) ;
@@ -1145,7 +1160,7 @@ describe('IgxSimpleCombo', () => {
1145
1160
1146
1161
item5 . triggerEventHandler ( 'click' , UIInteractions . getMouseEvent ( 'click' ) ) ;
1147
1162
fixture . detectChanges ( ) ;
1148
- expect ( combo . value ) . toBe ( undefined ) ;
1163
+ expect ( combo . value ) . toBe ( '' ) ;
1149
1164
} ) ;
1150
1165
1151
1166
it ( 'should select falsy values except "undefined"' , ( ) => {
0 commit comments