| 1050 | }); |
| 1051 | |
| 1052 | function createComponent(): ComponentFixture<CheckboxWithNgModel> { |
| 1053 | const fixture = TestBed.createComponent(CheckboxWithNgModel); |
| 1054 | |
| 1055 | fixture.componentInstance.isRequired = false; |
| 1056 | fixture.detectChanges(); |
| 1057 | |
| 1058 | checkboxDebugElement = fixture.debugElement.query(By.directive(MatCheckbox))!; |
| 1059 | checkboxNativeElement = checkboxDebugElement.nativeElement; |
| 1060 | checkboxInstance = checkboxDebugElement.componentInstance; |
| 1061 | inputElement = <HTMLInputElement>checkboxNativeElement.querySelector('input'); |
| 1062 | ngModel = checkboxDebugElement.injector.get<NgModel>(NgModel); |
| 1063 | |
| 1064 | return fixture; |
| 1065 | } |
| 1066 | }); |
| 1067 | |
| 1068 | describe('with name attribute', () => { |