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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants