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.
feature/default_network_editable
Mark Stacey 2 years ago committed by GitHub
parent 3746ad9451
commit 0841c1df4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      test/e2e/webdriver/driver.js

@ -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(

Loading…
Cancel
Save