From cdb9180629542dc87fe2b13e0e274277493b3768 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Sat, 7 Jun 2025 08:11:23 -0700 Subject: [PATCH] Generate report with https://github.com/daun/playwright-report-summary --- .github/workflows/e2e_tests.yml | 16 ++++++++++++++++ client/playwright.config.ts | 6 +++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e_tests.yml b/.github/workflows/e2e_tests.yml index d61227ba..df323c07 100644 --- a/.github/workflows/e2e_tests.yml +++ b/.github/workflows/e2e_tests.yml @@ -60,4 +60,20 @@ jobs: path: | client/playwright-report/ client/test-results/ + client/results.json retention-days: 30 + + - name: Publish Playwright Test Summary + uses: daun/playwright-report-summary@v3 + if: always() + with: + report-file: client/results.json + comment-title: "🎭 Playwright E2E Test Results" + job-summary: true + icon-style: "emojis" + custom-info: | + **Test Environment:** Ubuntu Latest, Node.js 18 + **Browsers:** Chromium, Firefox + + 📊 [View Detailed HTML Report](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) (download artifacts) + test-command: "npm run test:e2e" diff --git a/client/playwright.config.ts b/client/playwright.config.ts index 551f2d38..935e4b3d 100644 --- a/client/playwright.config.ts +++ b/client/playwright.config.ts @@ -14,7 +14,11 @@ export default defineConfig({ /* Opt out of parallel tests on CI. */ workers: process.env.CI ? 1 : undefined, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ - reporter: [["html", { outputFolder: "playwright-report" }], ["line"]], + reporter: [ + ["html", { outputFolder: "playwright-report" }], + ["json", { outputFile: "results.json" }], + ["line"], + ], /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { /* Base URL to use in actions like `await page.goto('/')`. */