Commit d992d121 authored by Sam Saccone's avatar Sam Saccone

Log captured logs even when we hit an error.

parent 45e23fc4
...@@ -41,6 +41,8 @@ module.exports.todoMVCTest = function (frameworkName, baseUrl, speedMode, laxMod ...@@ -41,6 +41,8 @@ module.exports.todoMVCTest = function (frameworkName, baseUrl, speedMode, laxMod
.setChromeOptions(chromeOptions) .setChromeOptions(chromeOptions)
.build(); .build();
browser.get(baseUrl); browser.get(baseUrl);
page = laxMode ? new PageLaxMode(browser) : new Page(browser); page = laxMode ? new PageLaxMode(browser) : new Page(browser);
...@@ -81,13 +83,17 @@ module.exports.todoMVCTest = function (frameworkName, baseUrl, speedMode, laxMod ...@@ -81,13 +83,17 @@ module.exports.todoMVCTest = function (frameworkName, baseUrl, speedMode, laxMod
.then(function () { done(); }); .then(function () { done(); });
}); });
} else { } else {
test.beforeEach(launchBrowser); try {
test.afterEach(function (done) { test.beforeEach(launchBrowser);
printCapturedLogs() test.afterEach(function (done) {
.then(function () { printCapturedLogs().then(function () {
return closeBrowser(done); return closeBrowser(done);
}); });
}); });
} catch (e) {
printCapturedLogs();
throw e;
}
} }
test.describe('When page is initially opened', function () { test.describe('When page is initially opened', function () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment