-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error with execution after just updating cucumber to latest version(4.2.1) #68
Comments
I think that the new version of cucumber requires a huge refactoring of the project :| In the next days I will try to update the version and will change the whole code to es6 (I need a new cucumber version and es6 for an internal project used by my company), but I don't think that the owner of the project will be happy :P |
Why would you change the codebase to es6? |
Because the latest cucumber-js release uses es6 and you need to refactor index.js and world.js in order to use that library. We can't mix es5 and es6 because eslint will scream to us and run in circle 😄 BTW this could make the implementation of the helpers, steps, etc... much simpler: Look to your example at "step-definitions/google-search-steps.js", you can write it in this way with es6: this.Then(/^I should see some results$/, () =>
driver.wait(until.elementsLocated(by.css('div.g')), 10000)
.then(() => driver.findElements(by.css('div.g')))
.then((elements) => expect(elements.length).to.not.equal(0))
); |
If that's true, it'll impact everyone using the project and all the tests/page objects they've created. I'll be honest, I'm not convinced it's necessary |
When I am trying to upgrade to newer version from index file getting some error. Its not related to es5/6. Its related to Cli. Would you be able to help me on this. |
I've made changes to selenium-cucumber-js to make it compatible with Cucumber-js v6.0. There were a lot of braking changes :/ and upgrade is not backwards compatible. To get it work you need to:
Repository: https://github.com/dcmarti/selenium-cucumber-es6 |
Hi,
I tried to run this project with just updating cucumber version to latest(4.2.1).
But I've caught an error below:
My-MAC:selenium-cucumber-js fbb$node index.js
/Users/fbb/Frameworks/cucumber-test8/selenium-cucumber-js/node_modules/babel-runtime/helpers/classCallCheck.js:7
throw new TypeError("Cannot call a class as a function");
^
TypeError: Cannot call a class as a function
at exports.default (/Users/fbb/Frameworks/cucumber-test8/selenium-cucumber-js/node_modules/babel-runtime/helpers/classCallCheck.js:7:11)
at Object.Cli (/Users/fbb/Frameworks/cucumber-test8/selenium-cucumber-js/node_modules/cucumber/lib/cli/index.js:78:34)
at Object. (/Users/fbb/Frameworks/cucumber-test8/selenium-cucumber-js/index.js:128:28)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:744:10)
at startup (internal/bootstrap/node.js:238:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:572:3)
Kindly let me know what am I doing wrong here.
The text was updated successfully, but these errors were encountered: