orca-scan / puppeteer-cucumber-js

Write browser automation tests using puppeteer and cucumber-js
ISC License
8 stars 11 forks source link

compatibility with latest cucumber js version #13

Open anilsky opened 3 years ago

anilsky commented 3 years ago

I am facing few issues when upgrades to latest cucumber version (version 6)

please can you recommend what changes will i need to do make it working with latest cucumber version (especially index.js file)

I really appreciate your help

Thanks, Anil

thu2004 commented 3 years ago

I am prototyping with the latest of @cucumber/cucumber

Got some issue with cucumber CLI.

Have you try to port it and any tips ?

anilsky commented 3 years ago

migrated to cucumber 6.0.5 you need to add/replace the code in index.js with the following

let runArgs = process.argv; let cliArgs = {argv : runArgs, cwd: process.cwd(), stdout: process.stdout}; let cli = new (require('cucumber').Cli)(cliArgs);

// CLI.run returns a promise return new Promise(function (resolve, reject) { try { return cli.run() .then(success => resolve((success === true) ? 0 : 1)); } catch (e) { return reject(e); } })

thu2004 commented 3 years ago

Why not migrate to cucumver 7.x.x and above ?

anilsky commented 3 years ago

if you want you can, we have some 3 party integrations which doesn't yet work with 7.x.x so we stick with 6.x.x