@@ -22,7 +22,7 @@ import { UIInteractions, wait } from '../test-utils/ui-interactions.spec';
2222import { IgxComboAddItemComponent } from './combo-add-item.component' ;
2323import { IgxComboDropDownComponent } from './combo-dropdown.component' ;
2424import { IgxComboItemComponent } from './combo-item.component' ;
25- import { IComboFilteringOptions , IgxComboState } from './combo.common' ;
25+ import { IComboFilteringOptions } from './combo.common' ;
2626import {
2727 IComboItemAdditionEvent , IComboSearchInputEventArgs , IComboSelectionChangingEventArgs , IgxComboComponent
2828} from './combo.component' ;
@@ -3019,26 +3019,26 @@ describe('igxCombo', () => {
30193019 expect ( combo . value ) . toEqual ( comboFormReference . value ) ;
30203020 expect ( combo . selection . length ) . toEqual ( 1 ) ;
30213021 expect ( combo . selection [ 0 ] . field ) . toEqual ( 'Connecticut' ) ;
3022- expect ( combo . valid ) . toEqual ( IgxComboState . INITIAL ) ;
3022+ expect ( combo . valid ) . toEqual ( IgxInputState . INITIAL ) ;
30233023 expect ( combo . comboInput . valid ) . toEqual ( IgxInputState . INITIAL ) ;
30243024 const clearButton = fixture . debugElement . query ( By . css ( `.${ CSS_CLASS_CLEARBUTTON } ` ) ) ;
30253025 clearButton . triggerEventHandler ( 'click' , UIInteractions . getMouseEvent ( 'click' ) ) ;
30263026 fixture . detectChanges ( ) ;
3027- expect ( combo . valid ) . toEqual ( IgxComboState . INVALID ) ;
3027+ expect ( combo . valid ) . toEqual ( IgxInputState . INVALID ) ;
30283028 expect ( combo . comboInput . valid ) . toEqual ( IgxInputState . INVALID ) ;
30293029
30303030 combo . onBlur ( ) ;
30313031 fixture . detectChanges ( ) ;
3032- expect ( combo . valid ) . toEqual ( IgxComboState . INVALID ) ;
3032+ expect ( combo . valid ) . toEqual ( IgxInputState . INVALID ) ;
30333033 expect ( combo . comboInput . valid ) . toEqual ( IgxInputState . INVALID ) ;
30343034
30353035 combo . select ( [ combo . dropdown . items [ 0 ] , combo . dropdown . items [ 1 ] ] ) ;
3036- expect ( combo . valid ) . toEqual ( IgxComboState . VALID ) ;
3036+ expect ( combo . valid ) . toEqual ( IgxInputState . VALID ) ;
30373037 expect ( combo . comboInput . valid ) . toEqual ( IgxInputState . VALID ) ;
30383038
30393039 combo . onBlur ( ) ;
30403040 fixture . detectChanges ( ) ;
3041- expect ( combo . valid ) . toEqual ( IgxComboState . INITIAL ) ;
3041+ expect ( combo . valid ) . toEqual ( IgxInputState . INITIAL ) ;
30423042 expect ( combo . comboInput . valid ) . toEqual ( IgxInputState . INITIAL ) ;
30433043 } ) ;
30443044 it ( 'should properly initialize when used as a form control - without validators' , ( ) => {
@@ -3051,26 +3051,26 @@ describe('igxCombo', () => {
30513051 expect ( combo . value ) . toEqual ( comboFormReference . value ) ;
30523052 expect ( combo . selection . length ) . toEqual ( 1 ) ;
30533053 expect ( combo . selection [ 0 ] . field ) . toEqual ( 'Connecticut' ) ;
3054- expect ( combo . valid ) . toEqual ( IgxComboState . INITIAL ) ;
3054+ expect ( combo . valid ) . toEqual ( IgxInputState . INITIAL ) ;
30553055 expect ( combo . comboInput . valid ) . toEqual ( IgxInputState . INITIAL ) ;
30563056 const clearButton = fixture . debugElement . query ( By . css ( `.${ CSS_CLASS_CLEARBUTTON } ` ) ) ;
30573057 clearButton . triggerEventHandler ( 'click' , UIInteractions . getMouseEvent ( 'click' ) ) ;
30583058 fixture . detectChanges ( ) ;
3059- expect ( combo . valid ) . toEqual ( IgxComboState . INITIAL ) ;
3059+ expect ( combo . valid ) . toEqual ( IgxInputState . INITIAL ) ;
30603060 expect ( combo . comboInput . valid ) . toEqual ( IgxInputState . INITIAL ) ;
30613061
30623062 combo . onBlur ( ) ;
30633063 fixture . detectChanges ( ) ;
3064- expect ( combo . valid ) . toEqual ( IgxComboState . INITIAL ) ;
3064+ expect ( combo . valid ) . toEqual ( IgxInputState . INITIAL ) ;
30653065 expect ( combo . comboInput . valid ) . toEqual ( IgxInputState . INITIAL ) ;
30663066
30673067 combo . select ( [ combo . dropdown . items [ 0 ] , combo . dropdown . items [ 1 ] ] ) ;
3068- expect ( combo . valid ) . toEqual ( IgxComboState . INITIAL ) ;
3068+ expect ( combo . valid ) . toEqual ( IgxInputState . INITIAL ) ;
30693069 expect ( combo . comboInput . valid ) . toEqual ( IgxInputState . INITIAL ) ;
30703070
30713071 combo . onBlur ( ) ;
30723072 fixture . detectChanges ( ) ;
3073- expect ( combo . valid ) . toEqual ( IgxComboState . INITIAL ) ;
3073+ expect ( combo . valid ) . toEqual ( IgxInputState . INITIAL ) ;
30743074 expect ( combo . comboInput . valid ) . toEqual ( IgxInputState . INITIAL ) ;
30753075 } ) ;
30763076 it ( 'should be possible to be enabled/disabled when used as a form control' , ( ) => {
@@ -3198,32 +3198,32 @@ describe('igxCombo', () => {
31983198 inputGroupRequired = fixture . debugElement . query ( By . css ( `.${ CSS_CLASS_INPUTGROUP_REQUIRED } ` ) ) ;
31993199 } ) ) ;
32003200 it ( 'should properly initialize when used in a template form control' , ( ) => {
3201- expect ( combo . valid ) . toEqual ( IgxComboState . INITIAL ) ;
3201+ expect ( combo . valid ) . toEqual ( IgxInputState . INITIAL ) ;
32023202 expect ( combo . comboInput . valid ) . toEqual ( IgxInputState . INITIAL ) ;
32033203 expect ( inputGroupRequired ) . toBeDefined ( ) ;
32043204 combo . onBlur ( ) ;
32053205 fixture . detectChanges ( ) ;
3206- expect ( combo . valid ) . toEqual ( IgxComboState . INVALID ) ;
3206+ expect ( combo . valid ) . toEqual ( IgxInputState . INVALID ) ;
32073207 expect ( combo . comboInput . valid ) . toEqual ( IgxInputState . INVALID ) ;
32083208
32093209 input . triggerEventHandler ( 'focus' , { } ) ;
32103210 combo . selectAllItems ( ) ;
32113211 fixture . detectChanges ( ) ;
3212- expect ( combo . valid ) . toEqual ( IgxComboState . VALID ) ;
3212+ expect ( combo . valid ) . toEqual ( IgxInputState . VALID ) ;
32133213 expect ( combo . comboInput . valid ) . toEqual ( IgxInputState . VALID ) ;
32143214
32153215 const clearButton = fixture . debugElement . query ( By . css ( `.${ CSS_CLASS_CLEARBUTTON } ` ) ) ;
32163216 clearButton . triggerEventHandler ( 'click' , UIInteractions . getMouseEvent ( 'click' ) ) ;
32173217 fixture . detectChanges ( ) ;
3218- expect ( combo . valid ) . toEqual ( IgxComboState . INVALID ) ;
3218+ expect ( combo . valid ) . toEqual ( IgxInputState . INVALID ) ;
32193219 expect ( combo . comboInput . valid ) . toEqual ( IgxInputState . INVALID ) ;
32203220 } ) ;
32213221 it ( 'should properly init with empty array and handle consecutive model changes' , fakeAsync ( ( ) => {
32223222 const model = fixture . debugElement . query ( By . directive ( NgModel ) ) . injector . get ( NgModel ) ;
32233223 fixture . componentInstance . values = [ ] ;
32243224 fixture . detectChanges ( ) ;
32253225 tick ( ) ;
3226- expect ( combo . valid ) . toEqual ( IgxComboState . INITIAL ) ;
3226+ expect ( combo . valid ) . toEqual ( IgxInputState . INITIAL ) ;
32273227 expect ( combo . comboInput . valid ) . toEqual ( IgxInputState . INITIAL ) ;
32283228 expect ( model . valid ) . toBeFalse ( ) ;
32293229 expect ( model . dirty ) . toBeFalse ( ) ;
@@ -3232,7 +3232,7 @@ describe('igxCombo', () => {
32323232 fixture . componentInstance . values = [ 'Missouri' ] ;
32333233 fixture . detectChanges ( ) ;
32343234 tick ( ) ;
3235- expect ( combo . valid ) . toEqual ( IgxComboState . INITIAL ) ;
3235+ expect ( combo . valid ) . toEqual ( IgxInputState . INITIAL ) ;
32363236 expect ( combo . comboInput . valid ) . toEqual ( IgxInputState . INITIAL ) ;
32373237 expect ( combo . selection ) . toEqual ( [ { field : 'Missouri' , region : 'West North Central' } ] ) ;
32383238 expect ( combo . value ) . toEqual ( [ 'Missouri' ] ) ;
@@ -3242,7 +3242,7 @@ describe('igxCombo', () => {
32423242
32433243 fixture . componentInstance . values = [ 'Missouri' , 'Missouri' ] ;
32443244 fixture . detectChanges ( ) ;
3245- expect ( combo . valid ) . toEqual ( IgxComboState . INITIAL ) ;
3245+ expect ( combo . valid ) . toEqual ( IgxInputState . INITIAL ) ;
32463246 expect ( combo . comboInput . valid ) . toEqual ( IgxInputState . INITIAL ) ;
32473247 expect ( combo . selection ) . toEqual ( [ { field : 'Missouri' , region : 'West North Central' } ] ) ;
32483248 expect ( combo . value ) . toEqual ( [ 'Missouri' ] ) ;
@@ -3253,7 +3253,7 @@ describe('igxCombo', () => {
32533253 fixture . componentInstance . values = null ;
32543254 fixture . detectChanges ( ) ;
32553255 tick ( ) ;
3256- expect ( combo . valid ) . toEqual ( IgxComboState . INITIAL ) ;
3256+ expect ( combo . valid ) . toEqual ( IgxInputState . INITIAL ) ;
32573257 expect ( combo . comboInput . valid ) . toEqual ( IgxInputState . INITIAL ) ;
32583258 expect ( combo . selection ) . toEqual ( [ ] ) ;
32593259 expect ( combo . value ) . toEqual ( [ ] ) ;
@@ -3264,7 +3264,7 @@ describe('igxCombo', () => {
32643264
32653265 combo . onBlur ( ) ;
32663266 fixture . detectChanges ( ) ;
3267- expect ( combo . valid ) . toEqual ( IgxComboState . INVALID ) ;
3267+ expect ( combo . valid ) . toEqual ( IgxInputState . INVALID ) ;
32683268 expect ( combo . comboInput . valid ) . toEqual ( IgxInputState . INVALID ) ;
32693269 expect ( model . valid ) . toBeFalse ( ) ;
32703270 expect ( model . touched ) . toBeTrue ( ) ;
@@ -3273,7 +3273,7 @@ describe('igxCombo', () => {
32733273 fixture . componentInstance . values = [ 'New Jersey' ] ;
32743274 fixture . detectChanges ( ) ;
32753275 tick ( ) ;
3276- expect ( combo . valid ) . toEqual ( IgxComboState . INITIAL ) ;
3276+ expect ( combo . valid ) . toEqual ( IgxInputState . INITIAL ) ;
32773277 expect ( combo . comboInput . valid ) . toEqual ( IgxInputState . INITIAL ) ;
32783278 expect ( combo . selection ) . toEqual ( [ { field : 'New Jersey' , region : 'Mid-Atlan' } ] ) ;
32793279 expect ( combo . value ) . toEqual ( [ 'New Jersey' ] ) ;
@@ -3292,12 +3292,12 @@ describe('igxCombo', () => {
32923292 it ( 'should set validity to initial when the form is reset' , fakeAsync ( ( ) => {
32933293 combo . onBlur ( ) ;
32943294 fixture . detectChanges ( ) ;
3295- expect ( combo . valid ) . toEqual ( IgxComboState . INVALID ) ;
3295+ expect ( combo . valid ) . toEqual ( IgxInputState . INVALID ) ;
32963296 expect ( combo . comboInput . valid ) . toEqual ( IgxInputState . INVALID ) ;
32973297
32983298 fixture . componentInstance . form . resetForm ( ) ;
32993299 tick ( ) ;
3300- expect ( combo . valid ) . toEqual ( IgxComboState . INITIAL ) ;
3300+ expect ( combo . valid ) . toEqual ( IgxInputState . INITIAL ) ;
33013301 expect ( combo . comboInput . valid ) . toEqual ( IgxInputState . INITIAL ) ;
33023302 } ) ) ;
33033303 } ) ;
0 commit comments