@@ -8,7 +8,7 @@ import {MatCheckboxModule as MatMdcCheckboxModule} from '../index';
88import { MatCheckboxHarness } from './checkbox-harness' ;
99import { MatCheckboxHarness as MatMdcCheckboxHarness } from './mdc-checkbox-harness' ;
1010
11- let fixture : ComponentFixture < unknown > ;
11+ let fixture : ComponentFixture < CheckboxHarnessTest > ;
1212let loader : HarnessLoader ;
1313let checkboxHarness : typeof MatCheckboxHarness ;
1414
@@ -141,6 +141,7 @@ function runTests() {
141141 } ) ;
142142
143143 it ( 'should toggle checkbox' , async ( ) => {
144+ fixture . componentInstance . disabled = false ;
144145 const checkboxes = await loader . getAllHarnesses ( checkboxHarness ) ;
145146 await checkboxes [ 0 ] . toggle ( ) ;
146147 await checkboxes [ 1 ] . toggle ( ) ;
@@ -149,6 +150,7 @@ function runTests() {
149150 } ) ;
150151
151152 it ( 'should check checkbox' , async ( ) => {
153+ fixture . componentInstance . disabled = false ;
152154 const checkboxes = await loader . getAllHarnesses ( checkboxHarness ) ;
153155 await checkboxes [ 0 ] . check ( ) ;
154156 await checkboxes [ 1 ] . check ( ) ;
@@ -157,6 +159,7 @@ function runTests() {
157159 } ) ;
158160
159161 it ( 'should uncheck checkbox' , async ( ) => {
162+ fixture . componentInstance . disabled = false ;
160163 const checkboxes = await loader . getAllHarnesses ( checkboxHarness ) ;
161164 await checkboxes [ 0 ] . uncheck ( ) ;
162165 await checkboxes [ 1 ] . uncheck ( ) ;
@@ -179,13 +182,14 @@ function getActiveElementTagName() {
179182 aria-label="First checkbox">
180183 First
181184 </mat-checkbox>
182- <mat-checkbox indeterminate="true" disabled="true " aria-labelledby="second-label">
185+ <mat-checkbox indeterminate="true" [ disabled]="disabled " aria-labelledby="second-label">
183186 Second
184187 </mat-checkbox>
185188 <span id="second-label">Second checkbox</span>
186189 `
187190} )
188191class CheckboxHarnessTest {
189192 ctrl = new FormControl ( true ) ;
193+ disabled = true ;
190194}
191195
0 commit comments