-
-
Notifications
You must be signed in to change notification settings - Fork 149
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
Added cucumber-js-style Before and After hooks. #195
Conversation
This should also fix #25. |
a65cf6d
to
1ee34c5
Compare
After some edge cases did not work, I had to do push some changes. This should work now. :) |
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.
Fantastic work. I didn't have a chance to try it out yet or review properly, just noticed that you commented out some tests. Otherwise it makes sense. @lucetius @sawasawasawa @rcywinski @dweller23 maybe one of you would like to checkout this branch, test the functionality and review the code?
lib/resolveStepDefinition.test.js
Outdated
require("../cypress/support/step_definitions/basic"); | ||
resolveFeatureFromFile("./cypress/integration/Plugin.feature"); | ||
}); | ||
|
||
describe("Background section", () => { | ||
require("../cypress/support/step_definitions/backgroundSection"); | ||
resolveFeatureFromFile("./cypress/integration/BackgroundSection.feature"); | ||
}); | ||
}); */ |
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.
any particular reason for commenting out this test? and the And and But below?
lib/resolveStepDefinition.test.js
Outdated
require("../cypress/support/step_definitions/and_and_but_steps"); | ||
resolveFeatureFromFile("./cypress/integration/AndAndButSteps.feature"); | ||
}); | ||
}); */ |
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.
this one as well
I have commented out these tests by mistake. I have force-pushed a new version without the comments. |
Good job |
What the heck @guiyomh? I'm reviewing this PR at the very moment! |
Looks great. I've tweaked some tests. Still thinking how to improve the readability of BeforeAndAfterSteps (pretty meta, hard to word it nicely, I know ;) ) The only thing I'm debating is whether we should overwrite the cypress exposed before/after. |
fe894ab
to
ddb5a46
Compare
@lgandecki I‘m fine with your changes. Go ahead. :) |
🎉 This PR is included in version 1.14.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Cucumber.js has Before and After hooks which can be used in conjunction with tags. This PR adds the same capability to cypress-cucumber-preprocessor:
It also allows asynchronous hooks, e.g.: