Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different behaviour for ambiguous steps in feature files and native tests #124

Open
ilyapuchka opened this issue Aug 27, 2018 · 0 comments

Comments

@ilyapuchka
Copy link
Collaborator

I noticed that there is currently different behavior when it comes to validating steps in NativeScenario and native tests. In native tests, there is no error because the first match is picked up, but in NativeScenario it results in ambiguity. Here is the example:

step("I'm logged in as (?!known)(.+)")
step("I'm logged in as (?<aKnownUser>Alice|Bob)")

// in feature file causes error
Given I'm logged in as Bob

// in native test - fine
Given("I'm logged in as Bob")

It is definitely possible to rewrite those two steps to avoid ambiguity but I think framework should behave the same way in both scenarios.

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

No branches or pull requests

1 participant