Skip to content
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

docs-bug(button): button-harness-example has wrong assignment #24732

Closed
Bishares opened this issue Apr 4, 2022 · 1 comment · Fixed by #24736
Closed

docs-bug(button): button-harness-example has wrong assignment #24732

Bishares opened this issue Apr 4, 2022 · 1 comment · Fixed by #24736
Assignees
Labels
area: material/button docs This issue is related to documentation P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@Bishares
Copy link

Bishares commented Apr 4, 2022

Documentation Feedback

I just noticed an error in your button-harness-example.spec.ts

In line 11 it has the following assignment

let buttonHarness = MatButtonHarness;

which was meant to be a declaration

let buttonHarness: MatButtonHarness;

But it turns out the buttonHarness variable is never assigned. The usages of that variable later on in the it() functions will also not work. The variable is not needed at all!

The it() blocks can just use MatButtonHarness.with() directly.

The following changes to that spec file should be made

  1. remove the let buttonHarness = MatButtonHarness; assignment in line 11
  2. adjust the usages of the buttonHarness variables in the second and third it() function. from buttonHarness.with() to MatButtonHarness.with()

Affected documentation page

https://material.angular.io/components/button/examples#button-harness

@Bishares Bishares added docs This issue is related to documentation needs triage This issue needs to be triaged by the team labels Apr 4, 2022
@crisbeto crisbeto self-assigned this Apr 5, 2022
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent has pr and removed needs triage This issue needs to be triaged by the team labels Apr 5, 2022
crisbeto added a commit to crisbeto/material2 that referenced this issue Apr 5, 2022
We were declaring the harness being used as a variable unecessarily. These changes align the example closer with the other harness examples.

Fixes angular#24732.
andrewseguin pushed a commit that referenced this issue May 2, 2022
We were declaring the harness being used as a variable unecessarily. These changes align the example closer with the other harness examples.

Fixes #24732.
andrewseguin pushed a commit that referenced this issue May 2, 2022
We were declaring the harness being used as a variable unecessarily. These changes align the example closer with the other harness examples.

Fixes #24732.

(cherry picked from commit 2c64ae3)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material/button docs This issue is related to documentation P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants