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:
parent
b9860034f2
commit
388cdccb28
@ -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 () {
|
||||
|
Loading…
Reference in New Issue
Block a user