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
Cucumber sync hooks #4288
Cucumber sync hooks #4288
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Can we add a smoke test that checks if all hooks are executed (e.g. by writing the name of the hook into a file or something around that)
If I could somehow determine step type in wrapStep function that would be awesome. |
Great news! I've managed to make before/after step hooks work! |
Codecov Report
@@ Coverage Diff @@
## master #4288 +/- ##
==========================================
+ Coverage 99.31% 99.31% +<.01%
==========================================
Files 178 180 +2
Lines 4359 4408 +49
Branches 936 948 +12
==========================================
+ Hits 4329 4378 +49
Misses 27 27
Partials 3 3
Continue to review full report at Codecov.
|
Added smoke tests for cucumber to ensure hooks and steps are running sync, will add unit tests later on |
work completed |
Thanks so much, I will take a closer look on Monday. |
@christian-bromann thank you! |
resolved all the conflicts and made changes according to #4308 |
Looking forward to seeing this merged, we will test the new version straight away once it is :) thanks a lot guys |
resolved conflicts, any other comments @christian-bromann @erwinheitzman ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
* wdio-cucumber-framework: sync hooks * wdio-cucumber-framework: add before after step hooks * wdio-cucumber-framework: simplify wrap step with hooks * wdio-cucumber-framework: fix sync step hook * wdio-cucumber-framework: add unit tests * wdio-cucumber-framework: added docs * wdio-sync: add executeSync test, mark other functions as ignored * fix typos in docs * wdio-cucumber-framework: print step hook failure * use isFunctionAsync everywhere * fix wdio-utils version * wdio-cucumber-framework: utils functions minor fixes * wdio-cucumber-framework: simplify getDataFromResult * remove redundant verifications * wdio-cucumber-framework: move hook definition types to constants * remove comma
Is this supposed to be working ? We have upgraded and I get my first step on my test being called beforeFeature which is causing quite a bit of issues |
Please raise an issue with proper description. |
Do you want me to raise an issue or would this be related to this one ? Basically we have a |
It's not related to the PR, I don't know anything about your setup, looks like some configuration issue. |
Hey guys, I still have issues, will file a bug report with a repro case as soon as possible. Is there an example repo where running functions inside the hooks is working ? Would like to have a look at one so I can check whether our setup is correct. Weirdly the code within the hooks on our side only seems to be able to run a console log and it stops running correctly as soon as I add anything else with it stops running, almost like it terminates completely. Any help with examples would be great, I will link the issue here once I raise it :) |
1 similar comment
Hey guys, I still have issues, will file a bug report with a repro case as soon as possible. Is there an example repo where running functions inside the hooks is working ? Would like to have a look at one so I can check whether our setup is correct. Weirdly the code within the hooks on our side only seems to be able to run a console log and it stops running correctly as soon as I add anything else with it stops running, almost like it terminates completely. Any help with examples would be great, I will link the issue here once I raise it :) |
Proposed changes
remove before/after step hooks, see add BeforeStep / AfterStep hooks cucumber/cucumber-js#997fixes #4207
Types of changes
Checklist
Further comments
Reviewers: @webdriverio/technical-committee