cabbage-ex / cabbage

Story BDD tool for executing elixir in ExUnit
MIT License
138 stars 33 forks source link

Add cucumber expressions functionality #47

Open tetiana12345678 opened 6 years ago

tetiana12345678 commented 6 years ago

Hello @mgwidmann ! I am wondering if there are plans to add cucumber expressions functionality, so we have something similar as described by Aslak here https://cucumber.io/blog/2017/07/26/announcing-cucumber-expressions

We are currently looking into it and I am wondering if you would accept a PR once we finished?

At the moment we are looking at features cucumber expressions provide, as described here https://docs.cucumber.io/cucumber/cucumber-expressions/ We are thinking at breaking that feature set into 3 features and deliver each in separate PR:

  1. support parameter types
  2. support optional text, alternative text, escaping
  3. support custom parameter types

To achieve that we are thinking of adding extra call to private find_implementation_of_step function, which would call CucumberExpressions module passing regex or string from step definition. Here is where we would call our module from https://github.com/cabbage-ex/cabbage/blob/master/lib/cabbage/feature.ex#L240

How do you feel about that?

hisapy commented 6 years ago

This will be really interesting.

I had to do some tweaks to the generated Regex in some steps to have some sort of optional or alternative text and it will be really cool to have them auto-generated by Cabbage in my future projects.

nicholasjhenry commented 5 years ago

This was started here: