We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If an attachment is created in after hook, it gets embedded to all subsequent after hooks of the current scenario and all before hooks of the next one. This is because attachments are cleared in AstTreeWalker.witnessNewStep (https://github.com/cucumber/cucumber-js/blob/master/lib/cucumber/runtime/ast_tree_walker.js#L223) but it does not get called for before/after hooks.
To reproduce create a feature file with 2 scenarios, define before and after hook and make an attachment in the latter:
this.Before(function (callback) { callback(); }); this.After(function (scenario, callback) { scenario.attach('BLABLABLA ', 'text/plain'); callback(); })
When this feature is run with JSON formatter, total number of embeddings will be 3 instead of 2.
The text was updated successfully, but these errors were encountered:
Thank you for reporting this. Fancy sending a PR?
Sorry, something went wrong.
#284
75822d8
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
No branches or pull requests
If an attachment is created in after hook, it gets embedded to all subsequent after hooks of the current scenario and all before hooks of the next one. This is because attachments are cleared in AstTreeWalker.witnessNewStep (https://github.com/cucumber/cucumber-js/blob/master/lib/cucumber/runtime/ast_tree_walker.js#L223) but it does not get called for before/after hooks.
To reproduce create a feature file with 2 scenarios, define before and after hook and make an attachment in the latter:
When this feature is run with JSON formatter, total number of embeddings will be 3 instead of 2.
The text was updated successfully, but these errors were encountered: