cucumber / cucumber-js

Cucumber for JavaScript
https://cucumber.io
MIT License
5.05k stars 1.09k forks source link

Change Cucumber's own features to use cucumber-expressions (from regexes) #1871

Open mattwynne opened 2 years ago

mattwynne commented 2 years ago

Right now we're using regular expressions in our own step definitions.

It would be good to change these over to using cucumber expressions (and parameter types!) so that we're providing a good example of how Cucumber should be used.

davidjgoss commented 2 years ago

Agreed!

aslakhellesoy commented 2 years ago

If you're mobbing with new contributors on this - show them https://cucumber.github.io/cucumber-expressions/ !

ghost commented 2 years ago

Hi @mattwynne, I would like to contribute to this issue.

mattwynne commented 2 years ago

Awesome @shvmsnju, let me know if you need any help.

pk commented 1 year ago

Is this issues still valid/pending? I could have a look to get started with the code base.

davidjgoss commented 1 year ago

@pk absolutely, feel free to raise PRs and let me know if you need any pointers.

pk commented 1 year ago

Perfect, we are using Cucumber so much that we really would like to contribute. Also our test suites are getting more and more complex and we may need to start to use some features from API, running the Features dynamically so it would be nice to contribute before I start asking too many questions. ;)

pk commented 1 year ago

OK, I've looked into this and I think this task is done.

There are steps under compability/**/*.ts and features/step_definitions/*.ts all of which has been converted into the Cucumber Expressions.

I've done search for Given/When/Then with the RegExp patterns and it really yields references to the steps with RegExp only in *.md files.

I may be missing something....

davidjgoss commented 1 year ago

Sorry for the confusion @pk - updating the examples in the .md docs would be equally valuable though!