@@ -167,6 +167,17 @@ describe('MatCheckboxHarness', () => {
167
167
await disabledCheckbox . toggle ( ) ;
168
168
expect ( await disabledCheckbox . isChecked ( ) ) . toBe ( false ) ;
169
169
} ) ;
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
+ } ) ;
170
181
} ) ;
171
182
172
183
@Component ( {
@@ -179,7 +190,11 @@ describe('MatCheckboxHarness', () => {
179
190
aria-label="First checkbox">
180
191
First
181
192
</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()">
183
198
Second
184
199
</mat-checkbox>
185
200
<span id="second-label">Second checkbox</span>
@@ -190,4 +205,5 @@ describe('MatCheckboxHarness', () => {
190
205
class CheckboxHarnessTest {
191
206
ctrl = new FormControl ( true ) ;
192
207
disabled = signal ( true ) ;
208
+ disabledInteractive = signal ( false ) ;
193
209
}
0 commit comments