Skip to content

Commit f0f6a74

Browse files
devversionandrewseguin
authored andcommitted
chore: fix autocomplete test (#7743)
Due to 9b4f435#diff-295d2cf77570f5880fd0c828fe60c2c4 the `mat-disabled` class is no longer being added to the underline element. The disabled class is now being added to the host element of the `mat-form-field` component.
1 parent f17cb99 commit f0f6a74

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lib/autocomplete/autocomplete.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -543,20 +543,20 @@ describe('MatAutocomplete', () => {
543543
}));
544544

545545
it('should disable input in view when disabled programmatically', () => {
546-
const inputUnderline =
547-
fixture.debugElement.query(By.css('.mat-form-field-underline')).nativeElement;
546+
const formFieldElement =
547+
fixture.debugElement.query(By.css('.mat-form-field')).nativeElement;
548548

549549
expect(input.disabled)
550550
.toBe(false, `Expected input to start out enabled in view.`);
551-
expect(inputUnderline.classList.contains('mat-disabled'))
551+
expect(formFieldElement.classList.contains('mat-form-field-disabled'))
552552
.toBe(false, `Expected input underline to start out with normal styles.`);
553553

554554
fixture.componentInstance.stateCtrl.disable();
555555
fixture.detectChanges();
556556

557557
expect(input.disabled)
558558
.toBe(true, `Expected input to be disabled in view when disabled programmatically.`);
559-
expect(inputUnderline.classList.contains('mat-disabled'))
559+
expect(formFieldElement.classList.contains('mat-form-field-disabled'))
560560
.toBe(true, `Expected input underline to display disabled styles.`);
561561
});
562562

0 commit comments

Comments
 (0)