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
Step definitions do not support callback style after being sychronized by serenity-js #8
Comments
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? The
If you don't, or they're if a different size, remove the Please let me know if that helped? Best, |
@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. |
If you do Getting WebDriver and Cucumber in sync step from tutorial before anything else then the test suite starts failing on Given step.
The worst part is that in console you don't see any output from test at all unless you disable preprotractor npm task.Probably not relevant to this issue, but preprotractor npm task just doesn't end properly on Mac OS.I have created a branch to reproduce the issue
https://github.com/InvictusMB/serenity-js-getting-started/tree/syncIssue
Console output
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.
But I cannot reason why only the first step fails.Because others are skipped if the first one is pending or failed. Otherwise they would fail in this case too.The text was updated successfully, but these errors were encountered: