feat: add page-based verification guide
This commit is contained in:
68
docs/plan.md
68
docs/plan.md
@@ -1,30 +1,30 @@
|
||||
# Implementation Plan: Staging Seed Full Coverage
|
||||
# Implementation Plan: Page Automation Verification
|
||||
|
||||
**Branch**: `main` | **Date**: 2026-01-26 | **Spec**: `docs/staging_smoke_test.md`
|
||||
**Input**: 全覆盖冒烟测试需要补齐 seed 数据。
|
||||
**Branch**: `main` | **Date**: 2026-01-26 | **Spec**: `docs/seed_verification.md`
|
||||
**Input**: 将验证流程转为纯页面自动化测试(Playwright)。
|
||||
|
||||
**Note**: 本计划遵循 `docs/templates/plan-template.md`。
|
||||
|
||||
## Summary
|
||||
|
||||
扩展 seed 数据覆盖冒烟测试未覆盖项:上传素材、交互记录、创作者流程完成态、财务账本/异常、退款/对账样例,并复核冒烟清单是否仍有缺口。
|
||||
新增一份“纯页面自动化验证”文档,包含服务启动步骤(backend/portal/superadmin)和 Playwright 操作清单,确保 AI 能在无 API 调用前提下完成冒烟验证。
|
||||
|
||||
## Technical Context
|
||||
|
||||
**Language/Version**: Go 1.22
|
||||
**Primary Dependencies**: Fiber, GORM-Gen
|
||||
**Storage**: PostgreSQL + Redis
|
||||
**Testing**: `go test ./...`
|
||||
**Target Platform**: staging
|
||||
**Language/Version**: JS (Playwright) + Go 1.22 + Vite
|
||||
**Primary Dependencies**: Playwright, Vite dev server
|
||||
**Storage**: PostgreSQL (seed 数据)
|
||||
**Testing**: 页面自动化 (browser-driven)
|
||||
**Target Platform**: Local + staging
|
||||
**Project Type**: Web application
|
||||
**Performance Goals**: N/A
|
||||
**Constraints**: 不改生成文件;seed 逻辑仅在 `backend/app/commands/seed/seed.go`。
|
||||
**Scale/Scope**: 覆盖冒烟清单全场景
|
||||
**Constraints**: 仅写文档,不修改业务代码
|
||||
**Scale/Scope**: 覆盖 portal + superadmin 冒烟场景
|
||||
|
||||
## Constitution Check
|
||||
|
||||
- 遵循 `backend/llm.txt`。
|
||||
- 只改非生成文件。
|
||||
- 不修改生成文件
|
||||
- 仅新增/更新文档
|
||||
|
||||
## Project Structure
|
||||
|
||||
@@ -32,45 +32,34 @@
|
||||
|
||||
```text
|
||||
docs/
|
||||
└── plan.md
|
||||
├── plan.md
|
||||
└── seed_verification.md
|
||||
```
|
||||
|
||||
### Source Code (repository root)
|
||||
|
||||
```text
|
||||
backend/
|
||||
└── app/commands/seed/seed.go
|
||||
```
|
||||
|
||||
**Structure Decision**: 继续扩展 seed 命令。
|
||||
|
||||
## Plan Phases
|
||||
|
||||
### Phase 1: 缺口确认
|
||||
- 对照冒烟清单明确缺失数据类型。
|
||||
### Phase 1: 启动流程梳理
|
||||
- 明确 backend/portal/superadmin 本地启动方式与代理关系。
|
||||
|
||||
### Phase 2: Seed 扩展
|
||||
- 添加交互记录、退款/对账样例、财务账本、异常/风控数据、创作者完成态、上传素材。
|
||||
### Phase 2: 自动化场景清单
|
||||
- 按 portal/superadmin 视图输出可自动化步骤与断言。
|
||||
|
||||
### Phase 3: 复核
|
||||
- 深度复查冒烟清单覆盖率并记录残余缺口。
|
||||
### Phase 3: 输出验证文档
|
||||
- 更新 `docs/seed_verification.md` 为“纯页面自动化”版本。
|
||||
|
||||
## Tasks
|
||||
|
||||
**Format**: `[ID] [P?] [Story] Description`
|
||||
|
||||
### Phase 1
|
||||
- [x] T001 [US0] 标记冒烟缺口(上传/交互/财务/退款/创作者)
|
||||
- [x] T001 [US0] 梳理服务启动命令与端口
|
||||
|
||||
### Phase 2
|
||||
- [x] T010 [US1] 创建交互记录(点赞/收藏)
|
||||
- [x] T011 [US1] 创建退款/对账样例订单
|
||||
- [x] T012 [US1] 创建租户账本/异常数据
|
||||
- [x] T013 [US1] 创建创作者审核通过与成员角色
|
||||
- [x] T014 [US1] 创建上传素材示例数据
|
||||
- [x] T010 [US1] Portal 页面自动化步骤
|
||||
- [x] T011 [US1] Superadmin 页面自动化步骤
|
||||
|
||||
### Phase 3
|
||||
- [x] T020 [US2] 深度 review 冒烟清单覆盖率
|
||||
- [x] T020 [US2] 更新验证文档
|
||||
|
||||
## Dependencies
|
||||
|
||||
@@ -78,12 +67,13 @@ backend/
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- seed 后冒烟清单所有场景具备至少一条数据支撑。
|
||||
- 记录残余缺口(如必须手动步骤)。
|
||||
- 文档包含完整启动流程与端口说明。
|
||||
- 文档包含可直接执行的页面自动化步骤。
|
||||
- 不涉及 API 级验证说明。
|
||||
|
||||
## Risks
|
||||
|
||||
- staging 数据冲突导致重复创建失败。
|
||||
- 登录依赖 OTP/浏览器控制台获取。
|
||||
|
||||
## Complexity Tracking
|
||||
|
||||
|
||||
Reference in New Issue
Block a user