From c91867b8eb8810b5a052dd5835b74224934dd57a Mon Sep 17 00:00:00 2001 From: Yiling-J Date: Sat, 8 Aug 2026 13:20:52 +0800 Subject: [PATCH] chore: split e2e scripts into app and webui targets (#280) Split the monolithic test:e2e script into: - test:e2e:app: fullstack web app e2e (playwright --project=app-chromium) - test:e2e:webui: harness UI integration tests (E2E_SKIP_APP_SERVER=true --project=harness-chromium) Remove the now-unused test:e2e:ui and test:e2e:report scripts, and update the AGENTS.md submission rules and e2e README to reference the new commands. --- AGENTS.md | 5 +++-- apps/web/e2e/README.md | 2 +- package.json | 5 ++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 84bb8b1b..583c2648 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -90,7 +90,8 @@ Add any additional context, caveats, or follow-up work. - `bun run format` - `bun run typecheck` - `bun run test` - - `bun run test:e2e` + - `bun run test:e2e:app` + - `bun run test:e2e:webui` - `bun run test:e2e:workflow` - **Backend Testing Mandate**: Every backend feature, service method, workflow, and activity MUST be accompanied by comprehensive tests. Logic-heavy code without corresponding test coverage is considered incomplete. @@ -285,7 +286,7 @@ describe('Team API', () => { ### Web App E2E Tests - Located in `apps/web/e2e/**/*.spec.ts`, organized by domain under `tests//` (e.g. `auth`, `project`). -- Run via `bun run test:e2e`. +- Run via `bun run test:e2e:app`. - **Fixtures**: Use the `owner`, `project`, and `file` fixtures for setup — they seed data through API calls/DB (no slow UI setup). You can add more fixtures if necessary. - **Documentation**: Every test case MUST be documented in [`apps/web/e2e/README.md`](apps/web/e2e/README.md). Add or update the corresponding entry in the README whenever you add, rename, or remove a spec. diff --git a/apps/web/e2e/README.md b/apps/web/e2e/README.md index f7615e16..9b016502 100644 --- a/apps/web/e2e/README.md +++ b/apps/web/e2e/README.md @@ -2,7 +2,7 @@ Fullstack end-to-end tests for the Shumai web app. They run against a real backend (pgvector container + local S3 storage) served on `http://localhost:5200` and are -executed with Playwright via `bun run test:e2e`. +executed with Playwright via `bun run test:e2e:app`. ## Structure diff --git a/package.json b/package.json index 1d868ed3..a6220403 100644 --- a/package.json +++ b/package.json @@ -18,11 +18,10 @@ "typecheck": "tsc --noEmit", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "test": "bun --bun vitest run", - "test:e2e": "playwright test --project=harness-chromium --project=app-chromium", + "test:e2e:app": "playwright test --project=app-chromium", + "test:e2e:webui": "E2E_SKIP_APP_SERVER=true playwright test --project=harness-chromium", "test:e2e:all": "playwright test", "test:e2e:workflow": "bun --bun vitest run -c packages/e2e/vitest.config.ts", - "test:e2e:ui": "playwright test --ui --project=harness-chromium --project=app-chromium", - "test:e2e:report": "playwright show-report", "test:e2e:install": "playwright install --with-deps", "harness:dev": "bun run packages/webui/e2e/harness/serve.ts", "format": "prettier --write .",