Closed
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
Hello,
When using MatChipListboxHarness.getChips()
it only returns mat-chip-option
elements, but not mat-chip
. Because of this a mat-chip-listbox like this example cannot be tested using the listbox harness. Not sure what is the correct solution for this because it can be solved using mat-chip-set
instead of listbox.
Possible solutions imho:
- Change example to use
mat-chip-set
instead ofmat-chip-listbox
. - Change
getChips()
signature to returnMatChipHarness[]
which would be a breaking change. - Add an additional method like
getStaticChips()
.
Reproduction
StackBlitz link: https://stackblitz.com/edit/qykqid
Expected Behavior
MatChipListboxHarness.getChips()
should include mat-chip
as well.
Actual Behavior
MatChipListboxHarness.getChips()
only returns mat-chip-option
.
Environment
- Angular: 17.0.1
- CDK/Material: 17.0.1
- Browser(s): -
- Operating System (e.g. Windows, macOS, Ubuntu): All