Skip to content

fix(material-experimental): typo in harness focus methods #16673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function runTests() {
it('should focus and blur a button', async () => {
const button = await loader.getHarness(buttonHarness.with({text: 'Basic button'}));
expect(getActiveElementId()).not.toBe('basic');
await button.foucs();
await button.focus();
expect(getActiveElementId()).toBe('basic');
await button.blur();
expect(getActiveElementId()).not.toBe('basic');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class MatButtonHarness extends ComponentHarness {
}

/** Focuses the button and returns a void promise that indicates when the action is complete. */
async foucs(): Promise<void> {
async focus(): Promise<void> {
return (await this.host()).focus();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class MatButtonHarness extends ComponentHarness {
}

/** Focuses the button and returns a void promise that indicates when the action is complete. */
async foucs(): Promise<void> {
async focus(): Promise<void> {
return (await this.host()).focus();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ function runTests() {
it('should focus checkbox', async () => {
const checkbox = await loader.getHarness(checkboxHarness.with({label: 'First'}));
expect(getActiveElementTagName()).not.toBe('input');
await checkbox.foucs();
await checkbox.focus();
expect(getActiveElementTagName()).toBe('input');
});

it('should blur checkbox', async () => {
const checkbox = await loader.getHarness(checkboxHarness.with({label: 'First'}));
await checkbox.foucs();
await checkbox.focus();
expect(getActiveElementTagName()).toBe('input');
await checkbox.blur();
expect(getActiveElementTagName()).not.toBe('input');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class MatCheckboxHarness extends ComponentHarness {
}

/** Focuses the checkbox and returns a void promise that indicates when the action is complete. */
async foucs(): Promise<void> {
async focus(): Promise<void> {
return (await this._input()).focus();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class MatCheckboxHarness extends ComponentHarness {
}

/** Focuses the checkbox and returns a void promise that indicates when the action is complete. */
async foucs(): Promise<void> {
async focus(): Promise<void> {
return (await this._input()).focus();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class MatSlideToggleHarness extends ComponentHarness {
}

/** Focuses the slide-toggle and returns a void promise that indicates action completion. */
async foucs(): Promise<void> {
async focus(): Promise<void> {
return (await this._input()).focus();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ function runTests() {
it('should focus slide-toggle', async () => {
const slideToggle = await loader.getHarness(slideToggleHarness.with({label: 'First'}));
expect(getActiveElementTagName()).not.toBe('input');
await slideToggle.foucs();
await slideToggle.focus();
expect(getActiveElementTagName()).toBe('input');
});

it('should blur slide-toggle', async () => {
const slideToggle = await loader.getHarness(slideToggleHarness.with({label: 'First'}));
await slideToggle.foucs();
await slideToggle.focus();
expect(getActiveElementTagName()).toBe('input');
await slideToggle.blur();
expect(getActiveElementTagName()).not.toBe('input');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class MatSlideToggleHarness extends ComponentHarness {
}

/** Focuses the slide-toggle and returns a void promise that indicates action completion. */
async foucs(): Promise<void> {
async focus(): Promise<void> {
return (await this._input()).focus();
}

Expand Down