Skip to content

bug with testing MatSelect using getHarness and getOptions #19075

Closed
lingounet/testage
#29

Description

Reproduction

Steps to reproduce:
When I have multiple matSelect elements on page, I use getHarness() method with an appropriate selector to get the required harness. When I use the getValueText() method on the grabbed harness, I get the expected value. However if I then use the getOptions method on this harness, I get the options from the very first matSelect element on the page and not the options from the matSelect harness I got using the selector.

Expected Behavior

Get the correct options from the MatSelectHarness grabbed using a selector.

Actual Behavior

I get the options from the very first matSelect element on page and not the options from the matSelect harness I got using the selector.

Environment

  • Angular: 9
  • CDK/Material: 9
  • Browser(s): latest Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions