@@ -44,7 +44,7 @@ describe('MatCheckbox', () => {
4444 fixture = createComponent ( SingleCheckbox ) ;
4545 fixture . detectChanges ( ) ;
4646
47- checkboxDebugElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ;
47+ checkboxDebugElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ! ;
4848 checkboxNativeElement = checkboxDebugElement . nativeElement ;
4949 checkboxInstance = checkboxDebugElement . componentInstance ;
5050 testComponent = fixture . debugElement . componentInstance ;
@@ -480,7 +480,7 @@ describe('MatCheckbox', () => {
480480 fixture = createComponent ( SingleCheckbox ) ;
481481 fixture . detectChanges ( ) ;
482482
483- checkboxDebugElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ;
483+ checkboxDebugElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ! ;
484484 checkboxNativeElement = checkboxDebugElement . nativeElement ;
485485 checkboxInstance = checkboxDebugElement . componentInstance ;
486486 testComponent = fixture . debugElement . componentInstance ;
@@ -512,7 +512,7 @@ describe('MatCheckbox', () => {
512512 fixture = createComponent ( SingleCheckbox ) ;
513513 fixture . detectChanges ( ) ;
514514
515- checkboxDebugElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ;
515+ checkboxDebugElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ! ;
516516 checkboxNativeElement = checkboxDebugElement . nativeElement ;
517517 checkboxInstance = checkboxDebugElement . componentInstance ;
518518 testComponent = fixture . debugElement . componentInstance ;
@@ -564,7 +564,7 @@ describe('MatCheckbox', () => {
564564 fixture = createComponent ( CheckboxWithChangeEvent ) ;
565565 fixture . detectChanges ( ) ;
566566
567- checkboxDebugElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ;
567+ checkboxDebugElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ! ;
568568 checkboxNativeElement = checkboxDebugElement . nativeElement ;
569569 checkboxInstance = checkboxDebugElement . componentInstance ;
570570 testComponent = fixture . debugElement . componentInstance ;
@@ -614,7 +614,7 @@ describe('MatCheckbox', () => {
614614
615615 it ( 'should use the provided aria-label' , fakeAsync ( ( ) => {
616616 fixture = createComponent ( CheckboxWithAriaLabel ) ;
617- checkboxDebugElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ;
617+ checkboxDebugElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ! ;
618618 checkboxNativeElement = checkboxDebugElement . nativeElement ;
619619 inputElement = < HTMLInputElement > checkboxNativeElement . querySelector ( 'input' ) ;
620620
@@ -638,7 +638,7 @@ describe('MatCheckbox', () => {
638638
639639 it ( 'should use the provided aria-labelledby' , fakeAsync ( ( ) => {
640640 fixture = createComponent ( CheckboxWithAriaLabelledby ) ;
641- checkboxDebugElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ;
641+ checkboxDebugElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ! ;
642642 checkboxNativeElement = checkboxDebugElement . nativeElement ;
643643 inputElement = < HTMLInputElement > checkboxNativeElement . querySelector ( 'input' ) ;
644644
@@ -648,7 +648,7 @@ describe('MatCheckbox', () => {
648648
649649 it ( 'should not assign aria-labelledby if none is provided' , fakeAsync ( ( ) => {
650650 fixture = createComponent ( SingleCheckbox ) ;
651- checkboxDebugElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ;
651+ checkboxDebugElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ! ;
652652 checkboxNativeElement = checkboxDebugElement . nativeElement ;
653653 inputElement = < HTMLInputElement > checkboxNativeElement . querySelector ( 'input' ) ;
654654
@@ -668,7 +668,7 @@ describe('MatCheckbox', () => {
668668 fixture . detectChanges ( ) ;
669669
670670 testComponent = fixture . debugElement . componentInstance ;
671- checkboxDebugElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ;
671+ checkboxDebugElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ! ;
672672 checkboxNativeElement = checkboxDebugElement . nativeElement ;
673673 inputElement = < HTMLInputElement > checkboxNativeElement . querySelector ( 'input' ) ;
674674 } ) ;
@@ -698,7 +698,8 @@ describe('MatCheckbox', () => {
698698 fixture . detectChanges ( ) ;
699699
700700 const checkbox =
701- fixture . debugElement . query ( By . directive ( MatCheckbox ) ) . componentInstance as MatCheckbox ;
701+ fixture . debugElement . query ( By . directive ( MatCheckbox ) ) !
702+ . componentInstance as MatCheckbox ;
702703
703704 expect ( checkbox . tabIndex )
704705 . toBe ( 5 , 'Expected tabIndex property to have been set based on the native attribute' ) ;
@@ -708,7 +709,7 @@ describe('MatCheckbox', () => {
708709 fixture = createComponent ( CheckboxWithTabindexAttr ) ;
709710 fixture . detectChanges ( ) ;
710711
711- const checkbox = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) . nativeElement ;
712+ const checkbox = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ! . nativeElement ;
712713 expect ( checkbox . getAttribute ( 'tabindex' ) ) . toBeFalsy ( ) ;
713714 } ) ) ;
714715 } ) ;
@@ -743,7 +744,7 @@ describe('MatCheckbox', () => {
743744 fixture . componentInstance . isRequired = false ;
744745 fixture . detectChanges ( ) ;
745746
746- checkboxDebugElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ;
747+ checkboxDebugElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ! ;
747748 checkboxNativeElement = checkboxDebugElement . nativeElement ;
748749 checkboxInstance = checkboxDebugElement . componentInstance ;
749750 inputElement = < HTMLInputElement > checkboxNativeElement . querySelector ( 'input' ) ;
@@ -785,7 +786,7 @@ describe('MatCheckbox', () => {
785786 fixture = createComponent ( CheckboxWithNgModelAndOnPush ) ;
786787 fixture . detectChanges ( ) ;
787788
788- checkboxDebugElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ;
789+ checkboxDebugElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ! ;
789790 checkboxNativeElement = checkboxDebugElement . nativeElement ;
790791 checkboxInstance = checkboxDebugElement . componentInstance ;
791792 inputElement = < HTMLInputElement > checkboxNativeElement . querySelector ( 'input' ) ;
@@ -860,7 +861,7 @@ describe('MatCheckbox', () => {
860861 } ) ;
861862
862863 it ( 'should forward name value to input element' , fakeAsync ( ( ) => {
863- let checkboxElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ;
864+ let checkboxElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ! ;
864865 let inputElement = < HTMLInputElement > checkboxElement . nativeElement . querySelector ( 'input' ) ;
865866
866867 expect ( inputElement . getAttribute ( 'name' ) ) . toBe ( 'test-name' ) ;
@@ -877,7 +878,7 @@ describe('MatCheckbox', () => {
877878 fixture = createComponent ( CheckboxWithFormControl ) ;
878879 fixture . detectChanges ( ) ;
879880
880- checkboxDebugElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ;
881+ checkboxDebugElement = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ! ;
881882 checkboxInstance = checkboxDebugElement . componentInstance ;
882883 testComponent = fixture . debugElement . componentInstance ;
883884 inputElement = < HTMLInputElement > checkboxDebugElement . nativeElement . querySelector ( 'input' ) ;
@@ -905,8 +906,8 @@ describe('MatCheckbox', () => {
905906
906907 beforeEach ( ( ) => {
907908 fixture = createComponent ( CheckboxWithoutLabel ) ;
908- const checkboxDebugEl = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ;
909- checkboxInnerContainer = checkboxDebugEl . query ( By . css ( '.mdc-form-field' ) ) . nativeElement ;
909+ const checkboxDebugEl = fixture . debugElement . query ( By . directive ( MatCheckbox ) ) ! ;
910+ checkboxInnerContainer = checkboxDebugEl . query ( By . css ( '.mdc-form-field' ) ) ! . nativeElement ;
910911 } ) ;
911912
912913 it ( 'should not add the "name" attribute if it is not passed in' , fakeAsync ( ( ) => {
0 commit comments