File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
projects/igniteui-angular/src/lib/directives/input Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -494,6 +494,18 @@ describe('IgxInput', () => {
494494 expect ( igxInput . valid ) . toBe ( IgxInputState . INITIAL ) ;
495495 } ) ) ;
496496
497+ it ( 'should correctly update enabled/disabled state of igxInput when changed via reactive form' , fakeAsync ( ( ) => {
498+ const fixture = TestBed . createComponent ( ReactiveFormComponent ) ;
499+ fixture . detectChanges ( ) ;
500+ const igxInput = fixture . componentInstance . strIgxInput ;
501+
502+ fixture . componentInstance . form . disable ( ) ;
503+ expect ( igxInput . disabled ) . toBe ( true ) ;
504+
505+ fixture . componentInstance . form . get ( 'str' ) . enable ( ) ;
506+ expect ( igxInput . disabled ) . toBe ( false ) ;
507+ } ) ) ;
508+
497509 it ( 'should style input when required is toggled dynamically.' , ( ) => {
498510 const fixture = TestBed . createComponent ( ToggleRequiredWithNgModelInputComponent ) ;
499511 fixture . detectChanges ( ) ;
You can’t perform that action at this time.
0 commit comments