test(e2e): 前后台联调 Playwright 与 admin 冒烟
ci / h5 (push) Canceled after 0s
ci / api (push) Canceled after 0s
ci / ess-docs (push) Canceled after 0s

新增 e2e-live 真 API 一致性全路径,并为 admin-h5 增加 mock 浏览器冒烟。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jackyu66git
2026-08-06 22:41:43 +08:00
co-authored by Cursor
parent 879bf70cb7
commit 7e9023f0a8
12 changed files with 400 additions and 1 deletions
+2
View File
@@ -14,6 +14,7 @@
| L1 Unit | Go engine `_test.go`H5 Vitest | 核心逻辑必有 |
| L2 Integration | `npm run test:api:integration`(需 Postgres | P1 关键流必有 |
| L3 E2E | `npm run test:e2e`Playwright,可用系统 Chrome | P1 收口至少 1 条 |
| L3 Live | `npm run test:e2e:live`(真 API + 用户 H5 + 运营后台) | 前后台数据一致性 |
## Go
@@ -46,6 +47,7 @@ npm run build:h5 && npm run test:e2e # Playwright(默认 channel=chrome
- 关键页:`PortraitPage` / `RelationPage` / `MembershipPage` 有 Vitest。
- Playwright 画像主路径使用 network mock,不依赖 Go。
- Admin`npm run test:e2e:admin`(登录→用户→授予→审计,network mock)。
- 若无系统 Chrome`npx playwright install chromium` 后设 `PW_CHANNEL=` 空或删 channel。
- **仅 build 通过 ≠ Frontend Done。**