-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(material-experimental/mdc-chips): align test harnesses with the non-MDC version #21051
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
Conversation
Caretaker note: I've had to make a few breaking changes to public APIs in order to align them with the non-MDC versions. The changes aren't going through the same breaking change process, because they're still under |
src/material-experimental/mdc-chips/testing/chip-harness.spec.ts
Outdated
Show resolved
Hide resolved
src/material-experimental/mdc-chips/testing/chip-listbox-harness.spec.ts
Outdated
Show resolved
Hide resolved
src/material-experimental/mdc-chips/testing/chip-listbox-harness.ts
Outdated
Show resolved
Hide resolved
…on-MDC version Aligns the test harnesses of the MDC-based chips module with the ones from the non-MDC version. Overview of the changes: * `MatChipGridHarness` - `getTextInput` was renamed to `getInput` to match the non-MDC list harness. Also adds a few utility methods to check whether the grid is disabled, required etc. * `MatChipHarness` - adds support for the same set of filters when querying for the harness. Also adds a method to get the removal button and disabled state. * `MatChipInputHarness` - adds a bunch of utility methods that we have on the other input-related harnesses. Also implemets the same set of harness filters as the non-MDC harness. * `MatChipListboxHarness` - Renames `getOptions` to `getChips` for consistency and removes the `getSelected` method in favor of filtering selected chips through the harness predicate. Also adds some utility methods for selecting chips, getting the disabled and required states etc. * `MatChipOptionHarness` - implements harness filters and adds APIs for selecting/deselecting. * `MatChipRemoveHarness` - new harness which is identical to the non-MDC `MatChipRemoveHarness`. * `MatChipSetHarness` - supports filtering through the `getChips` method. These changes also include tests for all the new functionality and minor cleanups around the `mdc-chips/testing` package.
432d365
to
69c4610
Compare
The feedback has been addressed. |
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
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. |
Aligns the test harnesses of the MDC-based chips module with the ones from the non-MDC version. Overview of the changes:
MatChipGridHarness
-getTextInput
was renamed togetInput
to match the non-MDC list harness. Also adds a few utility methods to check whether the grid is disabled, required etc.MatChipHarness
- adds support for the same set of filters when querying for the harness. Also adds a method to get the removal button and disabled state.MatChipInputHarness
- adds a bunch of utility methods that we have on the other input-related harnesses. Also implemets the same set of harness filters as the non-MDC harness.MatChipListboxHarness
- RenamesgetOptions
togetChips
for consistency and removes thegetSelected
method in favor of filtering selected chips through the harness predicate. Also adds some utility methods for selecting chips, getting the disabled and required states etc.MatChipOptionHarness
- implements harness filters and adds APIs for selecting/deselecting.MatChipRemoveHarness
- new harness which is identical to the non-MDCMatChipRemoveHarness
.MatChipSetHarness
- supports filtering through thegetChips
method.These changes also include tests for all the new functionality and minor cleanups around the
mdc-chips/testing
package.