kiwigrid / gherkin-testcafe

Run testcafe tests with gherkin syntax
MIT License
69 stars 2 forks source link

Allow using string in step definitions pattern #23

Closed msusur closed 5 years ago

msusur commented 5 years ago

This proposal for allowing string and regex in the step definition patterns. I find it very unusual and enforcing to only allow regex in the step definitions, therefore made some changes for it to allow strings as well. So feel free to close this PR if that was the required behaviour! 🍻

Before the change this line wouldn't work.

Given('I am open Google\'s search page', async t => { 
// ...
});

Also the example test was failing because apparently google changed their selector, I made some small changes so it should be passing now.

msusur commented 5 years ago

That was fair, I've amended my previous commit!

Lukas-Kullmann commented 5 years ago

Hey @msusur,

I published v1.6 with your changes. Thanks for your contribution! :)