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

Support Cucumber Expressions, ref #1002 #1156

Merged
merged 14 commits into from
Jul 26, 2017
Merged

Conversation

aslakhellesoy
Copy link
Contributor

@aslakhellesoy aslakhellesoy commented Jul 13, 2017

Summary

Support for Cucumber Expressions.

  • Basic support
  • Deprecate Transform (but try to make it work with current API)
  • Add API for defining custom parameter types
  • Print snippets as Cucumber Expressions
  • Print alternative expressions above snippets

Because the Cucumber Expressions library can generate multiple expressions for an undefined step,
snippets contain all of them, with all but one commented out:

Given("I have {float} {cucumis} in my belly") do |float, cucumis|
# Given("I have {float} {veg} in my belly") do |float, veg|
  pending # Write code here that turns the phrase above into concrete actions
end

Checklist:

  • I've added tests for my code
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@aslakhellesoy
Copy link
Contributor Author

I think this is pretty much done, apart from making a new release of Cucumber Expressions. I'm really excited about putting this in the next release.

Any reservations/objections/questions?

@aslakhellesoy aslakhellesoy changed the title WIP to support Cucumber Expressions, ref #1002 Support Cucumber Expressions, ref #1002 Jul 24, 2017
@aslakhellesoy
Copy link
Contributor Author

I've released cucumber-expressions 4.0.3. This can be merged to master now. Any objections or questions?

@aslakhellesoy aslakhellesoy merged commit 88fe641 into master Jul 26, 2017
@ghost ghost removed the status: ready to merge label Jul 26, 2017
@aslakhellesoy
Copy link
Contributor Author

Hi @aslakhellesoy,

Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! 🍾

In return for we ask you to:

  • ✅ Please continue to use branches and pull requests. When someone on the core team approves a pull request (yours or someone else's), you're welcome to merge it yourself.
  • 💚 Commit to setting a good example by following and upholding our code of conduct in your interactions with other collaborators and users.
  • 💬 Join the community Slack channel to meet the rest of the team and make yourself at home.
  • ℹ️ Don't feel obliged to help, just do what you can if you have the time and the energy.
  • 🙋 Ask if you need anything. We're looking for feedback about how to make the project more welcoming, so please tell us!

On behalf of the Cucumber core team,
Aslak Hellesøy
Creator of Cucumber

@aslakhellesoy
Copy link
Contributor Author

Wow thanks @aslakhellesoy!

@maxmeyer
Copy link
Member

@aslakhellesoy So what's left on aruba's side is add the cucumber expression steps as well correct?

@aslakhellesoy
Copy link
Contributor Author

@maxmeyer you mean translate, not add? If you have two or more expressions matching the same text, you'll get ambiguous errors.

@maxmeyer
Copy link
Member

@aslakhellesoy Ah ok. Was not sure, if this would make a difference. So one can only have either regex or expression step because the expression is translated into regex by the extension?

@aslakhellesoy
Copy link
Contributor Author

That's right. No need to translate the old regexps, but it might still make sense because it might make the step definitions more self-documenting. Here is the commit where it happened in Cucumber itself: 92208f6

@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
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.

2 participants