|
|
@ -30,12 +30,16 @@ describe('Metamask popup page', function () { |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
afterEach(async function () { |
|
|
|
afterEach(async function () { |
|
|
|
// check for console errors
|
|
|
|
// logs command not supported in firefox
|
|
|
|
const errors = await checkBrowserForConsoleErrors() |
|
|
|
// https://github.com/SeleniumHQ/selenium/issues/2910
|
|
|
|
if (errors.length) { |
|
|
|
if (process.env.SELENIUM_BROWSER === 'chrome') { |
|
|
|
const errorReports = errors.map(err => err.message) |
|
|
|
// check for console errors
|
|
|
|
const errorMessage = `Errors found in browser console:\n${errorReports.join('\n')}` |
|
|
|
const errors = await checkBrowserForConsoleErrors() |
|
|
|
this.test.error(new Error(errorMessage)) |
|
|
|
if (errors.length) { |
|
|
|
|
|
|
|
const errorReports = errors.map(err => err.message) |
|
|
|
|
|
|
|
const errorMessage = `Errors found in browser console:\n${errorReports.join('\n')}` |
|
|
|
|
|
|
|
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') { |
|
|
|