You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that beforeEach and afterEach are not getting called from with a Global.js file.
When a test fails, the afterEach method is skipped, which is not desirable since I am attempting to close a browser session and this affects subsequent tests within the same feature file/test implementation.
The text was updated successfully, but these errors were encountered:
I have the same issue, I was setting the code as following in nightwatch.conf.js, globals_path: "features/support/common.js"
with the following code, I can see before and after got executed via console.log, but can't see beforeEach or afterEach being executed. module.exports = { before: function(done) { console.log('Starting test...'); // run this only for the local-env if (this.isLocal) { // start the local server App.startServer(function() { // server listening done(); }); } else { done(); } }, after : function() { console.log('Closing down...'); }, beforeEach: function(browser, done) { console.log('within before each'); // performing an async operation setTimeout(function() { // finished async duties done(); }, 100); }, afterEach: function(browser, done) { // performing an async operation console.log('within after each'); setTimeout(function() { // finished async duties done(); }, 200); } };
It appears that beforeEach and afterEach are not getting called from with a Global.js file.
When a test fails, the afterEach method is skipped, which is not desirable since I am attempting to close a browser session and this affects subsequent tests within the same feature file/test implementation.
The text was updated successfully, but these errors were encountered: