From 09d039049da34609e2d772ddcce61492285b6514 Mon Sep 17 00:00:00 2001 From: Yordan Iliev Date: Wed, 15 Jan 2025 11:15:46 +0200 Subject: [PATCH] chore: Fix afterEach to collect failing tests Signed-off-by: Yordan Iliev --- automation/tests/settingsTests.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/tests/settingsTests.test.js b/automation/tests/settingsTests.test.js index 89ff778f4..f88c8bda7 100644 --- a/automation/tests/settingsTests.test.js +++ b/automation/tests/settingsTests.test.js @@ -50,7 +50,7 @@ test.describe('Settings tests', () => { }); test.afterEach(async ({}, testInfo) => { - if (testInfo.status === 'passed') { + if (testInfo.status !== 'passed') { const screenshotPath = `./test-results/screenshots/${testInfo.title.replace(/\s+/g, '_')}.png`; await window.screenshot({ path: screenshotPath }); console.log(`Screenshot saved: ${screenshotPath}`);