Skip to content
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 opened this issue Jun 3, 2013 · 1 comment
Closed

Comments

@Smerity
Copy link
Contributor

Smerity commented Jun 3, 2013

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.

@btford
Copy link
Contributor

btford commented Aug 24, 2013

As part of our effort to clean out old issues, this issue is being automatically closed since it has been inactivite for over two months.

Please try the newest versions of Angular (1.0.8 and 1.2.0-rc.1), and if the issue persists, comment below so we can discuss it.

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants