Using a deprecated version of cucumber
jeff-shep opened this issue · 3 comments
Intend to use this library to migrate from protractor to testcafe for running our existing test suite. Just trying to set things up and convert one of our tests as a proof of concept, after installing the libraries as documented I get a Cannot find module 'cucumber'
error. Should this package be using @cucumber/cucumber now, or am I missing something obvious? I can install cucumber as peer dependency to resolve it but this isn't a desired approach. As we get more familiar with this package, happy to contribute but just a question for now 😃
Hello @jeff-shep,
Thanks for reaching out!
This library is tested to work with Cucumber versions 5 and 6 (they are stable and continue to be maintained - https://github.com/cucumber/cucumber-js#install). Cucumber 7 is quite new (https://github.com/cucumber/cucumber-js/blob/master/CHANGELOG.md#700-2020-12-21) and has a number of breaking changes, so as far as I know it's not supported by gherkin-testcafe
for now.
testcafe-cucumber-steps
uses gherkin-testcafe
(https://www.npmjs.com/package/gherkin-testcafe - a package recommended by TestCafe team DevExpress/testcafe#1373 (comment)) to glue testcafe with cucumber together.
For the dependencies - as listed in peerDependencies
of testcafe-cucumber-steps
(https://github.com/Marketionist/testcafe-cucumber-steps/blob/master/package.json#L46), you will have to include 3 dependencies. To get them installed and saved to your package.json, in your project's root folder execute:
npm install cucumber@6.0.5 testcafe gherkin-testcafe --save-dev
I just updated the installation instructions accordingly (https://github.com/Marketionist/testcafe-cucumber-steps#installation-detailed). Please let me know if that works ok for you.
Thanks for the clarification @Marketionist, I've got testcafe-cucumber-steps
running now and really keen to migrate to predefined steps and make my life easier, thank you publishing this package!
Great, I'm happy to hear that!