1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Capture UI state upon e2e test failure (#8481)

The UI state is now captured and stored as a test artifact in the event
of an e2e test failure.
This commit is contained in:
Mark Stacey 2020-04-30 13:30:24 -03:00 committed by GitHub
parent b9860034f2
commit 388cdccb28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -171,6 +171,8 @@ class Driver {
await fs.writeFile(`${filepathBase}-screenshot.png`, screenshot, { encoding: 'base64' })
const htmlSource = await this.driver.getPageSource()
await fs.writeFile(`${filepathBase}-dom.html`, htmlSource)
const uiState = await this.driver.executeScript(() => window.getCleanAppState())
await fs.writeFile(`${filepathBase}-state.json`, JSON.stringify(uiState, null, 2))
}
async checkBrowserForConsoleErrors () {