Files
NextEdu/bugs/admin_web_test.md
SpecialX 978d9a8309
Some checks failed
Security / deep-security-scan (push) Failing after 20m5s
DR Drill / dr-drill (push) Failing after 1m31s
CI / scheduled-backup (push) Failing after 1m31s
CI / backup-verify (push) Has been skipped
CI / weekly-dr-drill (push) Failing after 0s
CI / build-deploy (push) Has been cancelled
CI / security-scan (push) Has been cancelled
feat: 新增备课模块并修复全模块 P0/P1/P2 缺陷
主要变更:

- 新增 lesson-preparation 模块: 备课编辑器、节点编辑、AI 建议、知识点选择、版本历史、作业发布

- 新增 shared 通用组件: charts/question-bank-filters/schedule-list/ui (chip-nav/filter-bar/page-header/stat-card/stat-item)

- 新增 student/admin 端 loading.tsx 与 error.tsx, 优化加载与错误态体验

- 新增 teacher/lesson-plans 页面 (列表/新建/编辑)

- 新增 drizzle 迁移 0002_tiny_lionheart 及 snapshot

- 新增 textbooks/schema.ts 与 exams/utils/normalize-structure.ts

- 修复 Tiptap v3 SSR hydration 崩溃 (rich-text-block immediatelyRender: false)

- 重构多模块 data-access/actions/组件, 修复权限校验与类型规范

- 同步架构文档 004/005 反映新增模块、导出、依赖关系

- 归档 bugs/* 测试报告与 e2e 测试脚本 (admin/parent/student/teacher web_test)
2026-06-22 01:06:16 +08:00

154 lines
4.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 管理员端 Web 功能测试报告
> 测试日期2026-06-20 13:09:23
> 测试范围:所有管理员端页面功能
> 测试工具Playwright + Chromium (headless)
> 测试账号admin@xiaoxue.edu.cn
> Base URLhttp://127.0.0.1:3000
---
## 一、测试概览
| 指标 | 数值 |
|------|------|
| 总测试页面数 | 31 |
| 通过 | 29 |
| 失败 | 0 |
| 警告 | 0 |
| 通过率 | 93.5% |
---
## 二、页面测试详情
### Announcement Detail
| 状态 | URL | HTTP状态 | 结果 | 备注 |
|------|-----|----------|------|------|
| ✅ | `/admin/announcements/bepepsukauda7qq3maftujc8` | 200 | passed | - |
| ✅ | `/admin/announcements/ann_class_g1c1` | 200 | passed | - |
### Announcements
| 状态 | URL | HTTP状态 | 结果 | 备注 |
|------|-----|----------|------|------|
| ✅ | `/admin/announcements` | 200 | passed | - |
### Announcements (Public)
| 状态 | URL | HTTP状态 | 结果 | 备注 |
|------|-----|----------|------|------|
| ✅ | `/announcements` | 200 | passed | - |
### Attendance
| 状态 | URL | HTTP状态 | 结果 | 备注 |
|------|-----|----------|------|------|
| ✅ | `/admin/attendance` | 200 | passed | - |
### Audit Logs
| 状态 | URL | HTTP状态 | 结果 | 备注 |
|------|-----|----------|------|------|
| ✅ | `/admin/audit-logs` | 200 | passed | - |
| ✅ | `/admin/audit-logs/login-logs` | 200 | passed | - |
| ✅ | `/admin/audit-logs/data-changes` | 200 | passed | - |
### Course Plan Detail
| 状态 | URL | HTTP状态 | 结果 | 备注 |
|------|-----|----------|------|------|
| ✅ | `/admin/course-plans/create` | 200 | passed | - |
| ✅ | `/admin/course-plans/cp_g1c1_chinese` | 200 | passed | - |
### Course Plans
| 状态 | URL | HTTP状态 | 结果 | 备注 |
|------|-----|----------|------|------|
| ✅ | `/admin/course-plans` | 200 | passed | - |
### Dashboard
| 状态 | URL | HTTP状态 | 结果 | 备注 |
|------|-----|----------|------|------|
| ✅ | `/admin/dashboard` | 200 | passed | - |
### Elective Edit
| 状态 | URL | HTTP状态 | 结果 | 备注 |
|------|-----|----------|------|------|
| ✅ | `/admin/elective/create` | 200 | passed | - |
### Electives
| 状态 | URL | HTTP状态 | 结果 | 备注 |
|------|-----|----------|------|------|
| ✅ | `/admin/elective` | 200 | passed | - |
### Files
| 状态 | URL | HTTP状态 | 结果 | 备注 |
|------|-----|----------|------|------|
| ✅ | `/admin/files` | 200 | passed | - |
### Messages
| 状态 | URL | HTTP状态 | 结果 | 备注 |
|------|-----|----------|------|------|
| ✅ | `/messages` | 200 | passed | - |
### Profile
| 状态 | URL | HTTP状态 | 结果 | 备注 |
|------|-----|----------|------|------|
| ✅ | `/profile` | 200 | passed | - |
### Scheduling
| 状态 | URL | HTTP状态 | 结果 | 备注 |
|------|-----|----------|------|------|
| ✅ | `/admin/scheduling/rules` | 200 | passed | - |
| ✅ | `/admin/scheduling/auto` | 200 | passed | - |
| ✅ | `/admin/scheduling/changes` | 200 | passed | - |
### School Management
| 状态 | URL | HTTP状态 | 结果 | 备注 |
|------|-----|----------|------|------|
| ✅ | `/admin/school` | 200 | passed | 重定向到: http://127.0.0.1:3000/admin/school/classes |
| ✅ | `/admin/school/schools` | 200 | passed | 错误: ClientFetchError: Failed to fetch. Read more at https://errors.authjs.dev#autherror
at fetchData (http://127.0.0.1:3000/_next/static/chunks/node_modules_bd34fee5._.js:2829:22)
at async getSession (http://127.0.0.1:3000/_next/static/chunks/node_modules_bd34fee5._.js:2996:21)
at async SessionProvider.useEffect [as _getSession] (http://127.0.0.1:3000/_next/static/chunks/node_modules_bd34fee5._.js:3139:51) |
| ✅ | `/admin/school/grades` | 200 | passed | - |
| ✅ | `/admin/school/grades/insights` | 200 | passed | - |
| ✅ | `/admin/school/departments` | 200 | passed | - |
| ✅ | `/admin/school/classes` | 200 | passed | - |
| ✅ | `/admin/school/academic-year` | 200 | passed | - |
### Settings
| 状态 | URL | HTTP状态 | 结果 | 备注 |
|------|-----|----------|------|------|
| ✅ | `/settings` | 200 | passed | - |
### Users
| 状态 | URL | HTTP状态 | 结果 | 备注 |
|------|-----|----------|------|------|
| ✅ | `/admin/users/import` | 200 | passed | - |
---
## 五、改进建议
1. **认证与权限**:失败页面中若出现重定向至 /login需检查会话过期策略与权限校验逻辑。
2. **HTTP 5xx 错误**:服务端错误需检查 Server Action 数据访问层与数据库连接。
3. **HTTP 4xx 错误**:客户端请求错误需检查路由参数与权限点映射。
4. **页面内容为空**:检查数据查询条件与渲染逻辑,确认数据源是否返回预期结果。
5. **控制台错误**:浏览器控制台报错需检查前端组件渲染与 API 调用。
---
*报告自动生成于 2026-06-20 13:09:23*