|
|
@@ -2,7 +2,7 @@
|
|
|
description:
|
|
|
alwaysApply: true
|
|
|
enabled: true
|
|
|
-updatedAt: 2026-04-04T01:46:41.444Z
|
|
|
+updatedAt: 2026-04-04T02:08:26.852Z
|
|
|
provider:
|
|
|
---
|
|
|
|
|
|
@@ -21,6 +21,8 @@ provider:
|
|
|
|
|
|
```
|
|
|
init → start → compiling → running → db-checking → backend-testing → frontend-testing → done
|
|
|
+ ↑ ↑
|
|
|
+ 【后端测试】 【前端测试⚠️】
|
|
|
```
|
|
|
|
|
|
| 状态 | 含义 |
|
|
|
@@ -30,10 +32,12 @@ init → start → compiling → running → db-checking → backend-testing →
|
|
|
| `compiling` | 编译中 |
|
|
|
| `running` | 运行中 |
|
|
|
| `db-checking` | 数据库验证中 |
|
|
|
-| `backend-testing` | 后端接口测试中 |
|
|
|
-| `frontend-testing` | 前端页面测试中 |
|
|
|
+| `backend-testing` | 后端接口测试中(用 curl) |
|
|
|
+| `frontend-testing` | 前端页面测试中(用 Playwright)⚠️ |
|
|
|
| `done` | 功能完成 |
|
|
|
|
|
|
+**⚠️ 注意**:必须测试前端页面,不能只用 curl 测试后端就结束
|
|
|
+
|
|
|
---
|
|
|
|
|
|
## Initializer Agent 规则
|
|
|
@@ -122,17 +126,18 @@ python backend/db_check.py
|
|
|
- 使用 curl 测试 API 接口
|
|
|
- 开发阶段 `auth_enabled: false`,跳过 token 验证
|
|
|
|
|
|
-#### 步骤 9:前端页面测试(状态 → frontend-testing)
|
|
|
+#### ⚠️ 步骤 9:前端页面测试(状态 → frontend-testing)⚠️
|
|
|
+**【必须测试前端,禁止跳过此步骤】**
|
|
|
```bash
|
|
|
-# 使用 Playwright cli 进行浏览器自动化测试
|
|
|
+# 使用 Playwright 进行浏览器自动化测试
|
|
|
npx playwright test
|
|
|
```
|
|
|
- 成功 → 更新状态为 `done`
|
|
|
- 失败 → 修复 → 重新测试
|
|
|
|
|
|
**前端测试要求**:
|
|
|
-- 必须使用 Playwright 或 Playwright cli 进行测试
|
|
|
-- 不能只用 curl
|
|
|
+- 必须使用 Playwright 或 Playwright cli
|
|
|
+- ❌ 禁止使用 curl 测试前端(curl 只能测后端)
|
|
|
|
|
|
#### 步骤 10:功能完成(状态 → done)
|
|
|
```bash
|
|
|
@@ -147,7 +152,8 @@ npx playwright test
|
|
|
- ❌ 不编译就测试
|
|
|
- ❌ 不运行就测试
|
|
|
- ❌ 不验证数据库连接
|
|
|
-- ❌ 前端测试不用 Playwright(只用 curl)
|
|
|
+- ❌ **忘记测试前端**(只测后端,不测前端)
|
|
|
+- ❌ **用 curl 测试前端页面**(禁止 curl 测试前端)
|
|
|
- ❌ 删除/修改 backend_test_steps
|
|
|
- ❌ 删除/修改 frontend_test_steps
|
|
|
- ❌ backend_test_steps 不包含增删改查
|