Skip to content

Commit

Permalink
Add cucumber.conf.js
Browse files Browse the repository at this point in the history
  • Loading branch information
garg3133 committed Aug 6, 2024
1 parent 90fd6d2 commit 71e4d19
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions cucumber.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const {AfterStep} = require('@cucumber/cucumber');

AfterStep(async function(testStep) {
// take screenshot on failure after each step
if (testStep.result.status === 'FAILED' && this.browser) {
await this.browser.saveScreenshot('failure-screenshot.png');
}
});

3 changes: 2 additions & 1 deletion nightwatch.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ module.exports = {
options: {
feature_path: 'tests/features/*.feature',
additional_config: '',
parallel: 2
parallel: 2,
require: ['./cucumber.conf.js']
}

},
Expand Down

0 comments on commit 71e4d19

Please sign in to comment.