From 62c70e50b38f2c30f136fcb32663c3fc22c8d460 Mon Sep 17 00:00:00 2001 From: muellerfluri Date: Wed, 11 Sep 2024 16:57:43 +0200 Subject: [PATCH] test(citrus-simulator-ui): add recorded video to workflow artifacts if playwright test failed --- .github/workflows/frontend.yml | 4 ++++ simulator-ui/playwright.config.ts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index c2241a6a..6e1530ed 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -85,3 +85,7 @@ jobs: name: playwright-report path: playwright-report/ retention-days: 30 + - uses: actions/upload-artifact@v4 + with: + name: test-results + path: playwright-failed-test-videos/ diff --git a/simulator-ui/playwright.config.ts b/simulator-ui/playwright.config.ts index 1cac822b..ea98d0de 100644 --- a/simulator-ui/playwright.config.ts +++ b/simulator-ui/playwright.config.ts @@ -29,6 +29,10 @@ export default defineConfig({ testIdAttribute: 'data-test', /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: 'on-first-retry', + video: { + mode: 'retain-on-failure' , + size: { width: 640, height: 480 } + } }, /* Configure projects for major browsers */