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

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

Closed

Conversation

Smerity
Copy link
Contributor

@Smerity Smerity commented Jun 3, 2013

This pull requests modifies ngScenario's select(...).option(val) such that it closes #2855.

This fix prefers exact matches when available, otherwise it reverts to the previous 'contains' behaviour for backwards compatibility.

This pull request also updates the dslSpec tests to ensure proper behaviour going forward for both the exact text match and the :contains text match.

With select(...).option(val) it previously would select the first node
which contains the value, even if an exact match was available.
This fix prefers exact matches if available, otherwise it reverts
to the previous 'contains' behaviour for backwards compatibility.
@petebacondarwin
Copy link
Member

PR Checklist (Minor Feature)

  • Contributor signed CLA now or in the past (if you just signed, leave a comment here with your real name for cross reference)
  • Feature improves existing core functionality
  • API is compatible with existing Angular apis and relevant standards (if applicable)
  • PR doesn't contain a breaking change
  • PR contains unit tests
  • PR contains e2e tests (if suitable)
  • PR contains documentation update
  • PR passes all tests on Travis (sanity)
  • PR passes all tests on ci.angularjs.org (cross-browser compatibility)
  • PR is rebased against recent master
  • PR is squashed into one commit per logical change
  • PR's commit messages are descriptive and allows us to autogenerate release notes (required commit message format)
  • All changes requested in review have been implemented

@petebacondarwin
Copy link
Member

@Smerity - have you signed the CLA? We need this before we can merge.

@Smerity
Copy link
Contributor Author

Smerity commented Jul 12, 2013

Hi @petebacondarwin,

I've indeed signed the online individual CLA under the name Stephen Merity using the email smerity@smerity.com =]

@petebacondarwin
Copy link
Member

Thanks @Smerity for your work on this PR.

ctrahey pushed a commit to ctrahey/angular.js that referenced this pull request Jul 22, 2013
With select(...).option(val) it previously would select the first node
which contains the value, even if an exact match was available.
This fix prefers exact matches if available, otherwise it reverts
to the previous 'contains' behaviour for backwards compatibility.

Closes angular#2856
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 this pull request may close these issues.

fix(ngScenario): select(...).option(val) should prioritise exact value match
2 participants