Skip to content

fix(material/testing): Fix minor issue preventing the label filter from working for some implementations #31596

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 1 commit into from
Jul 25, 2025

Conversation

wildcardalice
Copy link
Contributor

Updates the FormFieldControlHarness label capabilities to support a wider range of implementations. This affects any harness that derives from MatFormFieldControlHarnessBase, such as MatInputHarness and MatSelectHarness.

The current implementation works as expected when searching for a floating mat-label within a mat-form-field. However, it fails when searching for a label that is provided via <label for=...> or aria-label, as are suggested in the Material documentation. This change aims to expand support for these patterns to match the supporting documentation.

@wildcardalice wildcardalice requested a review from a team as a code owner July 24, 2025 15:36
@wildcardalice wildcardalice requested review from mmalerba and andrewseguin and removed request for a team July 24, 2025 15:36
@mmalerba mmalerba added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Jul 24, 2025
@wildcardalice wildcardalice force-pushed the label-filter-dev branch 4 times, most recently from 750bea9 to 4d00a37 Compare July 24, 2025 15:55
a label, including fallback functionality that checks `mat-label`
@crisbeto crisbeto removed the request for review from andrewseguin July 25, 2025 07:10
@crisbeto crisbeto merged commit 092c0f7 into angular:main Jul 25, 2025
20 of 22 checks passed
@crisbeto
Copy link
Member

The changes were merged into the following branches: main, 20.1.x

crisbeto pushed a commit that referenced this pull request Jul 25, 2025
…for (#31596)

a label, including fallback functionality that checks `mat-label`

(cherry picked from commit 092c0f7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: material/testing target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants