@@ -167,6 +167,17 @@ describe('MatCheckboxHarness', () => {
167167 await disabledCheckbox . toggle ( ) ;
168168 expect ( await disabledCheckbox . isChecked ( ) ) . toBe ( false ) ;
169169 } ) ;
170+
171+ it ( 'should get disabled state for checkbox with disabledInteractive' , async ( ) => {
172+ fixture . componentInstance . disabled . set ( false ) ;
173+ fixture . componentInstance . disabledInteractive . set ( true ) ;
174+
175+ const checkbox = await loader . getHarness ( MatCheckboxHarness . with ( { label : 'Second' } ) ) ;
176+ expect ( await checkbox . isDisabled ( ) ) . toBe ( false ) ;
177+
178+ fixture . componentInstance . disabled . set ( true ) ;
179+ expect ( await checkbox . isDisabled ( ) ) . toBe ( true ) ;
180+ } ) ;
170181} ) ;
171182
172183@Component ( {
@@ -179,7 +190,11 @@ describe('MatCheckboxHarness', () => {
179190 aria-label="First checkbox">
180191 First
181192 </mat-checkbox>
182- <mat-checkbox indeterminate="true" [disabled]="disabled()" aria-labelledby="second-label">
193+ <mat-checkbox
194+ indeterminate="true"
195+ [disabled]="disabled()"
196+ aria-labelledby="second-label"
197+ [disabledInteractive]="disabledInteractive()">
183198 Second
184199 </mat-checkbox>
185200 <span id="second-label">Second checkbox</span>
@@ -190,4 +205,5 @@ describe('MatCheckboxHarness', () => {
190205class CheckboxHarnessTest {
191206 ctrl = new FormControl ( true ) ;
192207 disabled = signal ( true ) ;
208+ disabledInteractive = signal ( false ) ;
193209}
0 commit comments