mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix crash on e2e test failure (#16556)
If an e2e test fails on a website, the driver will crash on this line because it can't find a reference to `stateHooks`. That variable is only set in our UI, not on other sites.
This commit is contained in:
parent
3746ad9451
commit
0841c1df4f
@ -416,7 +416,7 @@ class Driver {
|
|||||||
await fs.writeFile(`${filepathBase}-dom.html`, htmlSource);
|
await fs.writeFile(`${filepathBase}-dom.html`, htmlSource);
|
||||||
const uiState = await this.driver.executeScript(
|
const uiState = await this.driver.executeScript(
|
||||||
() =>
|
() =>
|
||||||
window.stateHooks.getCleanAppState &&
|
window.stateHooks?.getCleanAppState &&
|
||||||
window.stateHooks.getCleanAppState(),
|
window.stateHooks.getCleanAppState(),
|
||||||
);
|
);
|
||||||
await fs.writeFile(
|
await fs.writeFile(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user