From 33d92029a003be586fb0901d2a0bdaaa6f39fc20 Mon Sep 17 00:00:00 2001 From: OZGCloud <ozgcloud@mgm-tp.com> Date: Mon, 26 Aug 2024 11:03:05 +0200 Subject: [PATCH] revert --- alfa-client/apps/alfa-e2e/cypress.config.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/alfa-client/apps/alfa-e2e/cypress.config.ts b/alfa-client/apps/alfa-e2e/cypress.config.ts index 21267ba661..8b9ae40a50 100644 --- a/alfa-client/apps/alfa-e2e/cypress.config.ts +++ b/alfa-client/apps/alfa-e2e/cypress.config.ts @@ -10,9 +10,18 @@ export default defineConfig({ ...nxE2EPreset(__dirname), ...cypressConfig, setupNodeEvents(on, config) { + on('after:spec', (spec: Cypress.Spec, results: CypressCommandLine.RunResult) => { + if (results && results.video) { + const failures = results.tests.some((test) => + test.attempts.some((attempt) => attempt.state === 'failed'), + ); + if (!failures) { + fs.unlinkSync(results.video); + } + } + }); return cypressEvents(on, config); }, - videoUploadOnPasses: false, }, retries: { experimentalStrategy: 'detect-flake-and-pass-on-threshold', -- GitLab