Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Step definitions do not support callback style after being sychronized by serenity-js #8
If you do Getting WebDriver and Cucumber in sync step from tutorial before anything else then the test suite starts failing on Given step.
I have created a branch to reproduce the issue
I believe this mismatch is caused by synchronizing wrapper that always returns a promise even though a wrapped function may accept a callback thus the arity of a created wrapper should be different.
Hey @InvictusMB, you're correct, the synchroniser does not support the mixed mode (callbacks and promises), assuming that you'd only ever use promises when working with Serenity/JS.
I'll look into adding support for callback-style step definitions, and am happy to review pull requests too if you have some time you'd be willing to contribute?
If you don't, or they're if a different size, remove the
Please let me know if that helped?
referenced this issue
Dec 2, 2016
@jan-molak I did reinstall protractor and updated webdriver manually but unfortunately that didn't help. Rebooting fixed it though :)
While digging into cucumber I've found that it detects step interface type by comparing the number of parameters accepted by step definition and number of parameters parsed. So the same check should be sufficient in wrapper.