e2e: take screenshot of Obsidian app after failed E2E scenario

It will be automatically added to Allure reporter
This commit is contained in:
Kirill Gavrilov 2025-10-21 12:42:35 +03:00
parent f2638b5385
commit d83f0169ba

View file

@ -47,6 +47,11 @@ export const config: WebdriverIO.Config = {
ui: 'bdd',
timeout: debug ? ONE_DAY : 60000,
},
afterTest: async function (_test, _context, { error }) {
if (error) {
await browser.takeScreenshot()
}
},
beforeSuite: async () => {
await ObsidianApp.removeE2eTestVaultIfExists()
await ObsidianApp.createAndOpenFreshVault()