Skip to content

Commit 177c428

Browse files
dnlrbzDaniil Rabizo
authored andcommitted
fix(autocomplete) typos and unresolved variables in tests
Fix typos in comments and test description, fix query selectors and unresolved variables No breaking changes
1 parent fd416a3 commit 177c428

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/material/autocomplete/autocomplete.spec.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ describe('MDC-based MatAutocomplete', () => {
175175
.toEqual('');
176176
}));
177177

178-
it('should close the panel when the user clicks away via auxilliary button', waitForAsync(async () => {
178+
it('should close the panel when the user clicks away via auxiliary button', waitForAsync(async () => {
179179
dispatchFakeEvent(input, 'focusin');
180180
fixture.detectChanges();
181181
await new Promise(r => setTimeout(r));
@@ -1609,7 +1609,7 @@ describe('MDC-based MatAutocomplete', () => {
16091609
fixture.detectChanges();
16101610

16111611
expect(event.defaultPrevented)
1612-
.withContext(`Expected autocompete not to block ${name} key`)
1612+
.withContext(`Expected autocomplete not to block ${name} key`)
16131613
.toBe(false);
16141614
});
16151615
});
@@ -3440,7 +3440,7 @@ describe('MDC-based MatAutocomplete', () => {
34403440
widthFixture.detectChanges();
34413441

34423442
const overlayPane = overlayContainerElement.querySelector('.cdk-overlay-pane') as HTMLElement;
3443-
// Firefox, edge return a decimal value for width, so we need to parse and round it to verify
3443+
// Firefox, Edge return a decimal value for width, so we need to parse and round it to verify
34443444
expect(Math.ceil(parseFloat(overlayPane.style.width as string))).toBe(300);
34453445

34463446
widthFixture.componentInstance.trigger.closePanel();
@@ -3453,7 +3453,7 @@ describe('MDC-based MatAutocomplete', () => {
34533453
widthFixture.componentInstance.trigger.openPanel();
34543454
widthFixture.detectChanges();
34553455

3456-
// Firefox, edge return a decimal value for width, so we need to parse and round it to verify
3456+
// Firefox, Edge return a decimal value for width, so we need to parse and round it to verify
34573457
expect(Math.ceil(parseFloat(overlayPane.style.width as string))).toBe(500);
34583458
});
34593459

@@ -3850,7 +3850,7 @@ describe('MDC-based MatAutocomplete', () => {
38503850
dispatchFakeEvent(document.querySelector('mat-option')!, 'click');
38513851
fixture.detectChanges();
38523852

3853-
const selectedOption = document.querySelector('mat-option[aria-selected="true"');
3853+
const selectedOption = document.querySelector('mat-option[aria-selected="true"]');
38543854
expect(selectedOption).withContext('Expected an option to be selected.').not.toBeNull();
38553855
expect(selectedOption?.querySelector('.mat-pseudo-checkbox.mat-pseudo-checkbox-minimal'))
38563856
.withContext(
@@ -3876,7 +3876,7 @@ describe('MDC-based MatAutocomplete', () => {
38763876
dispatchFakeEvent(document.querySelector('mat-option')!, 'click');
38773877
fixture.detectChanges();
38783878

3879-
const selectedOption = document.querySelector('mat-option[aria-selected="true"');
3879+
const selectedOption = document.querySelector('mat-option[aria-selected="true"]');
38803880
expect(selectedOption).withContext('Expected an option to be selected.').not.toBeNull();
38813881
expect(document.querySelectorAll('.mat-pseudo-checkbox').length).toBe(0);
38823882
});
@@ -4212,7 +4212,7 @@ class AutocompleteWithoutPanel {
42124212
42134213
<mat-autocomplete #auto="matAutocomplete">
42144214
@for (group of stateGroups; track group) {
4215-
<mat-optgroup [label]="group.label">
4215+
<mat-optgroup [label]="group.title">
42164216
@for (state of group.states; track state) {
42174217
<mat-option [value]="state">
42184218
<span>{{ state }}</span>
@@ -4251,7 +4251,7 @@ class AutocompleteWithGroups {
42514251
<mat-autocomplete #auto="matAutocomplete">
42524252
@if (true) {
42534253
@for (group of stateGroups; track group) {
4254-
<mat-optgroup [label]="group.label">
4254+
<mat-optgroup [label]="group.title">
42554255
@for (state of group.states; track state) {
42564256
<mat-option [value]="state">
42574257
<span>{{ state }}</span>

0 commit comments

Comments
 (0)