Skip to content

feat(MatAutocompleteHarness): Add clearText() method #24751

@jhyot

Description

@jhyot

Feature Description

MatAutocompleteHarness has the enterText() method, which sends keys to the autocomplete input control. This means that it can only be used to add additional text. I think there is currently missing a method to clear the input.

Workaround

There is of course a workaround, to get the MatInputHarness directly and use the methods there to clear and set the control value, which works fine. But having it on the autocomplete harness would be more convenient.

Use Case

No response

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/autocompletefeatureThis issue represents a new feature or feature request rather than a bug or bug fix

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions