Skip to content

Commit 3bdf9ee

Browse files
committed
feat(core): e2e-api-walk
1 parent fba9f7d commit 3bdf9ee

7 files changed

Lines changed: 966 additions & 0 deletions

File tree

.session-id

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
33beba9f-5bbf-434a-8e48-e921e16cec74
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{"file": ".claude/commands/trellis/finish-work.md", "reason": "Finish work checklist"}
2+
{"file": ".trellis/spec/shared/index.md", "reason": "Shared coding standards"}
3+
{"file": ".claude/commands/trellis/check-backend.md", "reason": "Backend check spec"}
4+
{"file": ".claude/commands/trellis/check-frontend.md", "reason": "Frontend check spec"}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{"file": ".trellis/spec/shared/index.md", "reason": "Shared coding standards"}
2+
{"file": ".claude/commands/trellis/check-backend.md", "reason": "Backend check spec"}
3+
{"file": ".claude/commands/trellis/check-frontend.md", "reason": "Frontend check spec"}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{"file": ".trellis/workflow.md", "reason": "Project workflow and conventions"}
2+
{"file": ".trellis/spec/shared/index.md", "reason": "Shared coding standards"}
3+
{"file": ".trellis/spec/backend/index.md", "reason": "Backend development guide"}
4+
{"file": ".trellis/spec/backend/api-module.md", "reason": "API module conventions"}
5+
{"file": ".trellis/spec/backend/quality.md", "reason": "Code quality requirements"}
6+
{"file": ".trellis/spec/frontend/index.md", "reason": "Frontend development guide"}
7+
{"file": ".trellis/spec/frontend/components.md", "reason": "Component conventions"}
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# E2E API Walk - Walk all server-ng APIs via admin DOM operations
2+
3+
## Requirements
4+
- 通过admin前端DOM操作,walk所有server-ng的API端点
5+
- 验证每个API的可访问性和响应正确性
6+
- 使用Chrome DevTools MCP进行自动化测试
7+
8+
## Acceptance Criteria
9+
- [ ] 所有API端点被walked(通过admin UI触发)
10+
- [ ] 记录每个API的响应状态(200/404/500等)
11+
- [ ] 识别并记录任何失败的API
12+
- [ ] 生成测试报告
13+
14+
## API Coverage List
15+
16+
### Auth Module
17+
- POST /api/v2/auth/login - 用户登录
18+
- POST /api/v2/auth/logout - 用户登出
19+
- POST /api/v2/auth/refresh - 刷新Token
20+
21+
### Article Module
22+
- GET /api/v2/articles - 获取文章列表
23+
- GET /api/v2/articles/:id - 获取单个文章
24+
- POST /api/v2/articles - 创建文章
25+
- PUT /api/v2/articles/:id - 更新文章
26+
- DELETE /api/v2/articles/:id - 删除文章
27+
- GET /api/v2/articles/search - 搜索文章
28+
- POST /api/v2/articles/:id/verifyPassword - 验证文章密码
29+
- GET /api/v2/articles/export - 导出文章
30+
31+
### Draft Module
32+
- GET /api/v2/drafts - 获取草稿列表
33+
- GET /api/v2/drafts/:id - 获取单个草稿
34+
- POST /api/v2/drafts - 创建草稿
35+
- PUT /api/v2/drafts/:id - 更新草稿
36+
- DELETE /api/vrafts/:id - 删除草稿
37+
- POST /api/v2/drafts/:id/publish - 发布草稿
38+
39+
### Category Module
40+
- GET /api/v2/categories - 获取分类列表
41+
- GET /api/v2/categories/:id - 获取单个分类
42+
- POST /api/v2/categories - 创建分类
43+
- PUT /api/v2/categories/:id - 更新分类
44+
- DELETE /api/v2/categories/:id - 删除分类
45+
- GET /api/v2/categories/name/:name/articles - 按名称获取文章
46+
47+
### Tag Module
48+
- GET /api/v2/tags - 获取标签列表
49+
- GET /api/v2/tags/:id - 获取单个标签
50+
- POST /api/v2/tags - 创建标签
51+
- PUT /api/v2/tags/:id - 更新标签
52+
- DELETE /api/v2/tags/:id - 删除标签
53+
- GET /api/v2/tags/:id/articles - 获取标签下的文章
54+
55+
### Media Module
56+
- GET /api/v2/media - 获取媒体列表
57+
- POST /api/v2/media/upload - 上传媒体
58+
- DELETE /api/v2/media/:id - 删除媒体
59+
- GET /api/v2/media/statistics - 获取媒体统计
60+
61+
### User Module
62+
- GET /api/v2/admin/users - 获取用户列表
63+
- GET /api/v2/admin/users/:id - 获取单个用户
64+
- POST /api/v2/admin/users - 创建用户
65+
- PUT /api/v2/admin/users/:id - 更新用户
66+
- DELETE /api/v2/admin/users/:id - 删除用户
67+
- GET /api/v2/admin/users/collaborators - 获取协作者列表
68+
69+
### Settings Module
70+
- GET /api/v2/admin/settings/site - 获取站点设置
71+
- PUT /api/v2/admin/settings/site - 更新站点设置
72+
- GET /api/v2/admin/seo - 获取SEO设置
73+
- PUT /api/v2/admin/seo - 更新SEO设置
74+
- GET /api/v2/admin/comment - 获取评论设置
75+
- PUT /api/v2/admin/comment - 更新评论设置
76+
77+
### Backup Module
78+
- GET /api/v2/admin/backup/list - 获取备份列表
79+
- POST /api/v2/admin/backup/create - 创建备份
80+
- POST /api/v2/admin/backup/restore - 恢复备份
81+
82+
### Pipeline Module
83+
- GET /api/v2/pipelines - 获取管道列表
84+
- GET /api/v2/pipelines/:id - 获取单个管道
85+
- POST /api/v2/pipelines - 创建管道
86+
- PUT /api/v2/pipelines/:id - 更新管道
87+
- DELETE /api/v2/pipelines/:id - 删除管道
88+
- POST /api/v2/pipelines/:id/trigger - 触发管道
89+
90+
### Plugin Module
91+
- GET /api/v2/admin/plugins - 获取插件列表
92+
- POST /api/v2/admin/plugins/reload - 重载插件
93+
- GET /api/v2/admin/plugins/:name/config - 获取插件配置
94+
- PUT /api/v2/admin/plugins/:name/config - 更新插件配置
95+
96+
## Testing Approach
97+
1. 启动admin前端 (http://localhost:3002)
98+
2. 启动server-ng后端 (http://localhost:3050)
99+
3. 使用Chrome DevTools MCP导航到admin页面
100+
4. 通过DOM操作登录
101+
5. 系统性地导航到每个功能页面
102+
6. 观察Network面板的API调用
103+
7. 记录结果
104+
105+
## Deliverables
106+
- 测试报告(包含每个API的状态)
107+
- 失败API列表(如有)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"id": "e2e-api-walk",
3+
"name": "e2e-api-walk",
4+
"title": "Walk all server-ng APIs via admin DOM operations",
5+
"description": "",
6+
"status": "planning",
7+
"dev_type": null,
8+
"scope": null,
9+
"priority": "P2",
10+
"creator": "CornWorld",
11+
"assignee": "CornWorld",
12+
"createdAt": "2026-02-02",
13+
"completedAt": null,
14+
"branch": "task/e2e-api-walk",
15+
"base_branch": "refactor/baseline",
16+
"worktree_path": "/Users/corn/Code/trellis-worktrees/task/e2e-api-walk",
17+
"current_phase": 3,
18+
"next_action": [
19+
{
20+
"phase": 1,
21+
"action": "implement"
22+
},
23+
{
24+
"phase": 2,
25+
"action": "check"
26+
},
27+
{
28+
"phase": 3,
29+
"action": "finish"
30+
},
31+
{
32+
"phase": 4,
33+
"action": "create-pr"
34+
}
35+
],
36+
"commit": null,
37+
"pr_url": null,
38+
"subtasks": [],
39+
"relatedFiles": [],
40+
"notes": ""
41+
}

0 commit comments

Comments
 (0)