1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

test - e2e - only inspect console for errors in chrome

This commit is contained in:
kumavis 2018-05-21 20:17:46 -07:00
parent a3ca64d321
commit 83782421bb

View File

@ -30,6 +30,9 @@ describe('Metamask popup page', function () {
}) })
afterEach(async function () { afterEach(async function () {
// logs command not supported in firefox
// https://github.com/SeleniumHQ/selenium/issues/2910
if (process.env.SELENIUM_BROWSER === 'chrome') {
// check for console errors // check for console errors
const errors = await checkBrowserForConsoleErrors() const errors = await checkBrowserForConsoleErrors()
if (errors.length) { if (errors.length) {
@ -37,6 +40,7 @@ describe('Metamask popup page', function () {
const errorMessage = `Errors found in browser console:\n${errorReports.join('\n')}` const errorMessage = `Errors found in browser console:\n${errorReports.join('\n')}`
this.test.error(new Error(errorMessage)) this.test.error(new Error(errorMessage))
} }
}
// gather extra data if test failed // gather extra data if test failed
if (this.currentTest.state === 'failed') { if (this.currentTest.state === 'failed') {
await verboseReportOnFailure(this.currentTest) await verboseReportOnFailure(this.currentTest)