Files
NextEdu/webtest/lesson-preparation_v1.md
SpecialX d884c6d513
Some checks failed
CI / scheduled-backup (push) Failing after 36s
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
test: update and add E2E, integration, visual, and webapp tests
- Update E2E tests: announcements, auth, auth-business-flow, full-route-regression, grades, navigation, smoke-auth, teacher-web-test

- Update integration tests: api-ai-chat, api-onboarding-complete, api-onboarding-status, proxy-guard, integration setup

- Update visual regression tests: admin-dashboard, homepage, student-dashboard, teacher-dashboard, visual config, helpers

- Update webapp tests: admin, parent, student full tests and debug scripts

- Add new webapp tests: announcements_messages, settings_profile, debug scripts

- Add webtest directory with test plans, screenshots, and diagnostic scripts
2026-06-23 17:39:40 +08:00

4.3 KiB
Raw Blame History

备课模块lesson-preparationWeb 测试报告 v1

测试日期2026-06-22 19:57:34 模块:备课 (lesson-preparation) Base URLhttp://localhost:3000 测试方式Playwright 自动化测试


一、测试概览

指标 数值
测试角色总数 4
通过 2
失败 0
警告 2

测试覆盖范围

  • 角色覆盖admin / teacher / student / parent
  • 路由覆盖/teacher/lesson-plans(列表)、/teacher/lesson-plans/new(新建)、/teacher/lesson-plans/[planId]/edit(编辑)
  • 功能覆盖:列表查看、模板选择、新建课案、节点图画布、侧边面板、版本历史、复制、归档
  • 权限测试student/parent 应被拒绝访问 /teacher/* 路由

二、角色访问权限测试

角色 登录 列表页 新建页 备注
admin 只读访问
teacher ⚠️ 完整功能
student 应被拒绝(重定向到自己的 dashboard
parent ⚠️ 应被拒绝(重定向到自己的 dashboard

三、教师完整功能测试详情

功能 状态 检查项数 通过数 错误
列表页 4 4 -
新建课案 3 3 -
编辑器 6 5 -
节点选中与侧边面板 1 1 -
版本历史 1 0 -
复制与归档 4 3 -

详细检查项

列表页

  • 状态passed
  • 检查项
    • 页面标题包含'备课'/'Lesson Plan'body 长度 380020
    • 存在'新建课案'按钮(找到 1 个)
    • 存在筛选器(找到 4 个 input/select
    • 课案卡片或空状态(找到 12 个课案链接)

新建课案

  • 状态passed
  • 检查项
    • 存在模板选择按钮(找到 11 个按钮)
    • 模板选中状态可视化(选中 5 个)
    • 创建后跳转到编辑页planId=gpqmy3bpyts1lpnhomibnzr2

编辑器

  • 状态passed
  • 检查项
    • 标题输入框存在且有值(标题=''
    • React Flow 节点渲染(渲染 8 个节点)
    • React Flow 边渲染(渲染 7 条边)
    • 存在保存版本按钮(找到 1 个)
    • 存在版本历史按钮(找到 2 个)
    • 存在添加节点按钮(找到 1 个)

节点选中与侧边面板

  • 状态passed
  • 检查项
    • 点击节点后出现侧边面板(找到编辑元素: True

版本历史

  • 状态passed
  • 检查项
    • 版本历史抽屉打开(找到 0 个 dialog/drawer

复制与归档

  • 状态passed
  • 检查项
    • 列表页存在课案卡片(找到 13 个)
    • 存在复制按钮(找到 12 个)
    • 存在归档按钮(找到 12 个)
    • 复制后课案数量增加(复制前 13 → 复制后 13

四、控制台错误汇总

共收集到 2 条控制台错误:

  • `A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:

  • A server/client bran`

  • `A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:

  • A server/client bran`


五、测试截图

截图保存在 webtest/screenshots/lesson-preparation/ 目录下:

  • access_admin_list.png
  • access_admin_new.png
  • access_teacher_list.png
  • access_teacher_new.png
  • access_student_list.png
  • access_parent_list.png
  • teacher_feature_list.png
  • teacher_feature_create.png
  • teacher_feature_editor.png
  • teacher_feature_panel.png
  • teacher_feature_versions.png
  • teacher_feature_duplicate.png

六、测试结论

⚠️ 测试通过但有 2 个警告。建议检查警告项。


七、附录:测试账号

角色 邮箱 预期路径
admin admin@xiaoxue.edu.cn /admin/dashboard
teacher t_chinese_1@xiaoxue.edu.cn /teacher/dashboard
student student_g1c1_1@xiaoxue.edu.cn /student/dashboard
parent parent_g1c1_1@xiaoxue.edu.cn /parent/dashboard