Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix(ngScenario): select(...).option(val) should prioritise exact value match #2855

Closed
@Smerity

Description

@Smerity

The existing select(...).option(val) in ngScenario will take any option that contains the given value, ignoring whether or not it's an exact match. This results in the following unexpected behaviour.

<select ng-model="test">
  <option value=A>twenty one</option>
  <option value=B selected>two</option>
  <option value=C>thirty one</option>
  <option value=D>one</option>
</select>'
select('test').option('one');

This actually selects value=A (twenty one) as it contains one. The expected behaviour would be prioritise exact matches, such as value D (one), before selecting any option that contains the value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions