File tree 1 file changed +4
-0
lines changed 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -710,6 +710,7 @@ describe('MdCheckbox', () => {
710
710
let checkboxDebugElement : DebugElement ;
711
711
let checkboxInstance : MdCheckbox ;
712
712
let testComponent : CheckboxWithFormControl ;
713
+ let inputElement : HTMLInputElement ;
713
714
714
715
beforeEach ( ( ) => {
715
716
fixture = TestBed . createComponent ( CheckboxWithFormControl ) ;
@@ -718,6 +719,7 @@ describe('MdCheckbox', () => {
718
719
checkboxDebugElement = fixture . debugElement . query ( By . directive ( MdCheckbox ) ) ;
719
720
checkboxInstance = checkboxDebugElement . componentInstance ;
720
721
testComponent = fixture . debugElement . componentInstance ;
722
+ inputElement = < HTMLInputElement > checkboxDebugElement . nativeElement . querySelector ( 'input' ) ;
721
723
} ) ;
722
724
723
725
it ( 'should toggle the disabled state' , ( ) => {
@@ -727,11 +729,13 @@ describe('MdCheckbox', () => {
727
729
fixture . detectChanges ( ) ;
728
730
729
731
expect ( checkboxInstance . disabled ) . toBe ( true ) ;
732
+ expect ( inputElement . disabled ) . toBe ( true ) ;
730
733
731
734
testComponent . formControl . enable ( ) ;
732
735
fixture . detectChanges ( ) ;
733
736
734
737
expect ( checkboxInstance . disabled ) . toBe ( false ) ;
738
+ expect ( inputElement . disabled ) . toBe ( false ) ;
735
739
} ) ;
736
740
} ) ;
737
741
} ) ;
You can’t perform that action at this time.
0 commit comments