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
Conversation
Adds test harnesses for the MDC-based radio button and radio button group.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this 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)
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. |
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. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Adds test harnesses for the MDC-based radio button and radio button group.