Skip to content

bug(MatChipHarness): Chip Text contains "cancel" #20503

@mischkl

Description

@mischkl

Reproduction

Use StackBlitz to reproduce your issue: https://stackblitz.com/fork/components-issue

Steps to reproduce:

  1. Create a chip list with cancel buttons, as in autocomplete example https://stackblitz.com/angular/lmgdmgnkkxbb?file=src%2Fapp%2Fchips-autocomplete-example.ts
  2. Get MatChipListHarness, call "getChips()" on it and then "getText()" on one of the chip harnesses.

Expected Behavior

What behavior were you expecting to see?

Text of chip includes only the label, e.g. "Lemon".

Actual Behavior

What behavior did you actually see?

Text of chip includes "cancel" text from within the mat-icon as well, e.g. "Lemoncancel".

Environment

  • Angular: 10.1.0
  • CDK/Material: 10.2.0
  • Browser(s): Chrome 85
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/testing

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions