Skip to content

Commit

Permalink
Fix crash on e2e test failure (#16556)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Gudahtt authored Nov 17, 2022
1 parent 3746ad9 commit 0841c1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/e2e/webdriver/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ class Driver {
await fs.writeFile(`${filepathBase}-dom.html`, htmlSource);
const uiState = await this.driver.executeScript(
() =>
window.stateHooks.getCleanAppState &&
window.stateHooks?.getCleanAppState &&
window.stateHooks.getCleanAppState(),
);
await fs.writeFile(
Expand Down

0 comments on commit 0841c1d

Please sign in to comment.