From 7f911eb6a555e8207e419eb0d1123cfb62ef4c35 Mon Sep 17 00:00:00 2001 From: Brentthomas248 Date: Thu, 2 Jul 2026 22:53:14 -0500 Subject: [PATCH] test: add Playwright E2E coverage --- .github/workflows/e2e.yml | 47 +++++++++++++++++++++++++++ components/sidebar-panel.tsx | 3 ++ e2e/admin-passport.spec.ts | 25 ++++++++++++++ e2e/agent-wallet.spec.ts | 26 +++++++++++++++ e2e/onboarding-modal.spec.ts | 60 ++++++++++++++++++++++++++++++++++ e2e/sidebar-tabs.spec.ts | 61 ++++++++++++++++++++++++++++++++++ package-lock.json | 63 ++++++++++++++++++++++++++++++++++++ package.json | 4 +++ playwright.config.ts | 34 +++++++++++++++++++ vitest.config.ts | 2 +- 10 files changed, 324 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/e2e.yml create mode 100644 e2e/admin-passport.spec.ts create mode 100644 e2e/agent-wallet.spec.ts create mode 100644 e2e/onboarding-modal.spec.ts create mode 100644 e2e/sidebar-tabs.spec.ts create mode 100644 playwright.config.ts diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml new file mode 100644 index 00000000..3607d66d --- /dev/null +++ b/.github/workflows/e2e.yml @@ -0,0 +1,47 @@ +name: E2E + +on: + pull_request: + branches: + - main + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: e2e-${{ github.ref }} + cancel-in-progress: true + +jobs: + playwright: + name: Playwright E2E + runs-on: ubuntu-latest + timeout-minutes: 20 + + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: Setup Node + uses: actions/setup-node@v6 + with: + node-version: 20 + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Install Playwright Chromium + run: npx playwright install --with-deps chromium + + - name: Run Playwright tests + run: npm run test:e2e -- --project=chromium --reporter=html + + - name: Upload Playwright report + uses: actions/upload-artifact@v6 + if: always() + with: + name: playwright-report + path: playwright-report/ + retention-days: 14 diff --git a/components/sidebar-panel.tsx b/components/sidebar-panel.tsx index dc9180bd..0a395084 100644 --- a/components/sidebar-panel.tsx +++ b/components/sidebar-panel.tsx @@ -790,7 +790,10 @@ export function SidebarPanel({ {SIDEBAR_TABS.map(tab => (