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

feat(material-experimental/mdc-radio): add test harness #20283

Merged
merged 1 commit into from Aug 13, 2020

Conversation

crisbeto
Copy link
Member

Adds test harnesses for the MDC-based radio button and radio button group.

Adds test harnesses for the MDC-based radio button and radio button group.
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent merge safe target: minor This PR is targeted for the next minor release labels Aug 12, 2020
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Aug 12, 2020
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jelbourn jelbourn added the action: merge The PR is ready for merge by the caretaker label Aug 12, 2020
Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Out of curiosity: Is there any reason why we do not extend the non-MDC harnesses as that would enforce compatible class interface and also reduce duplication (which we'd usually need to keep in sync)

@crisbeto
Copy link
Member Author

crisbeto commented Aug 13, 2020

I talked to @mmalerba about this yesterday and the opinion was that we shouldn't be trying to reuse logic between the MDC and non-MDC harnesses since it's mostly calls into the internal harness APIs and the shared tests should ensure that the behavior is consistent.

@devversion
Copy link
Member

devversion commented Aug 13, 2020

Yeah, it's good that the shared tests ensure compatibility, though it seems like it would be still valuable to consider extending as that might help with code duplication. It seemed to work fine for the MDC-based dialog harness; and I can already see that there is quite a bit code duplicated in the radio harness.

Obviously there are cases where differences are expected, though that should not prevent us from sharing in other cases IMO. Most of the time it seems like only the locators would need to be updated. Since we ensure compatibility of these harnesses, we intend to keep logic in sync. Inheritance could make that easier, and also reduce code duplication.

To be clear: I'm perfectly fine with this change; I just wondered why we not share the similar radio code.

@andrewseguin andrewseguin merged commit 68b4374 into angular:master Aug 13, 2020
@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 Sep 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants