mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
force background exceptions to show (#16860)
* force background exceptions to show * fix type
This commit is contained in:
parent
34b1595f29
commit
c9b42fc966
@ -9,6 +9,7 @@ const Ganache = require('./ganache');
|
|||||||
const FixtureServer = require('./fixture-server');
|
const FixtureServer = require('./fixture-server');
|
||||||
const PhishingWarningPageServer = require('./phishing-warning-page-server');
|
const PhishingWarningPageServer = require('./phishing-warning-page-server');
|
||||||
const { buildWebDriver } = require('./webdriver');
|
const { buildWebDriver } = require('./webdriver');
|
||||||
|
const { PAGES } = require('./webdriver/driver');
|
||||||
const { ensureXServerIsRunning } = require('./x-server');
|
const { ensureXServerIsRunning } = require('./x-server');
|
||||||
const GanacheSeeder = require('./seeder/ganache-seeder');
|
const GanacheSeeder = require('./seeder/ganache-seeder');
|
||||||
|
|
||||||
@ -152,7 +153,13 @@ async function withFixtures(options, testSuite) {
|
|||||||
driver.exceptions.length > 0 &&
|
driver.exceptions.length > 0 &&
|
||||||
failOnConsoleError
|
failOnConsoleError
|
||||||
) {
|
) {
|
||||||
const errorMessage = `Errors found in browser console:\n${driver.exceptions.join(
|
/**
|
||||||
|
* Navigate to the background
|
||||||
|
* forcing background exceptions to be captured
|
||||||
|
* proving more helpful context
|
||||||
|
*/
|
||||||
|
await driver.navigate(PAGES.BACKGROUND);
|
||||||
|
const errorMessage = `Errors found in browser console including the background:\n${driver.exceptions.join(
|
||||||
'\n',
|
'\n',
|
||||||
)}`;
|
)}`;
|
||||||
throw Error(errorMessage);
|
throw Error(errorMessage);
|
||||||
|
Loading…
Reference in New Issue
Block a user