Skip to content

feat(material/testing): Add 'type' attribute filter and getter to Mat… #31657

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 3 commits into from
Aug 11, 2025

Conversation

wildcardalice
Copy link
Contributor

@wildcardalice wildcardalice commented Aug 6, 2025

Type attribute reference

This small change is primarily intended to simplify filtering for a submit button in a form.

// Before
MatButtonHarness.with({ selector: '[type="submit"]' });

// After (buttonType avoids conflict with the reserved keyword, type)
MatButtonHarness.with({ buttonType: 'submit' });

@wildcardalice wildcardalice requested a review from a team as a code owner August 6, 2025 18:40
@wildcardalice wildcardalice requested review from adolgachev and wagnermaciel and removed request for a team August 6, 2025 18:40
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: material/testing labels Aug 6, 2025
@wildcardalice wildcardalice force-pushed the button-filter-type branch 2 times, most recently from d9dce35 to 8d141f1 Compare August 6, 2025 19:42
"buttonType" to avoid conflict with the reserved TS keyword
@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 target: minor This PR is targeted for the next minor release and removed target: patch This PR is targeted for the next patch release labels Aug 11, 2025
@mmalerba mmalerba merged commit 54d514d into angular:main Aug 11, 2025
28 of 31 checks passed
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 detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants