test: update and add E2E, integration, visual, and webapp tests
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

- 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
This commit is contained in:
SpecialX
2026-06-23 17:39:40 +08:00
parent f40ce0f560
commit d884c6d513
183 changed files with 19006 additions and 0 deletions

418
webtest/textbooks_v1.json Normal file
View File

@@ -0,0 +1,418 @@
{
"test_date": "2026-06-22 20:19:50",
"module": "教材 (textbooks)",
"version": "v1",
"base_url": "http://localhost:3000",
"summary": {
"total": 4,
"passed": 4,
"failed": 0,
"warnings": 0
},
"roles": {
"admin": {
"role": "admin",
"login_success": true,
"teacher_list_page": {
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/textbooks",
"errors": [],
"warnings": []
},
"student_list_page": {
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/admin/dashboard?from=%2Fstudent%2Flearning%2Ftextbooks&reason=forbidden",
"errors": [],
"warnings": []
},
"checks": [
{
"name": "admin 有权访问教师教材列表页",
"passed": true,
"detail": "HTTP 200"
},
{
"name": "admin 访问学生端教材页被拦截(符合预期)",
"passed": true,
"detail": "重定向到 http://localhost:3000/admin/dashboard?from=%2Fstudent%2Flearning%2Ftextbooks&reason=forbidden"
}
],
"screenshots": [
"access_admin_teacher_list.png",
"access_admin_student_list.png"
]
},
"teacher": {
"role": "teacher",
"login_success": true,
"teacher_list_page": {
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/textbooks",
"errors": [],
"warnings": []
},
"student_list_page": {
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/teacher/dashboard?from=%2Fstudent%2Flearning%2Ftextbooks&reason=forbidden",
"errors": [],
"warnings": []
},
"checks": [
{
"name": "teacher 有权访问教师教材列表页",
"passed": true,
"detail": "HTTP 200"
},
{
"name": "teacher 访问学生端教材页被拦截(符合预期)",
"passed": true,
"detail": "重定向到 http://localhost:3000/teacher/dashboard?from=%2Fstudent%2Flearning%2Ftextbooks&reason=forbidden"
}
],
"screenshots": [
"access_teacher_teacher_list.png",
"access_teacher_student_list.png"
]
},
"student": {
"role": "student",
"login_success": true,
"teacher_list_page": {
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/student/dashboard?from=%2Fteacher%2Ftextbooks&reason=forbidden",
"errors": [],
"warnings": []
},
"student_list_page": {
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/student/learning/textbooks",
"errors": [],
"warnings": []
},
"checks": [
{
"name": "student 无权限访问教师教材页被正确拦截",
"passed": true,
"detail": "重定向到 http://localhost:3000/student/dashboard?from=%2Fteacher%2Ftextbooks&reason=forbidden"
},
{
"name": "学生有权访问学生端教材列表页",
"passed": true,
"detail": "HTTP 200"
}
],
"screenshots": [
"access_student_teacher_list.png",
"access_student_student_list.png"
]
},
"parent": {
"role": "parent",
"login_success": true,
"teacher_list_page": {
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/parent/dashboard?from=%2Fteacher%2Ftextbooks&reason=forbidden",
"errors": [],
"warnings": []
},
"student_list_page": {
"status": "passed",
"http_status": 200,
"final_url": "http://localhost:3000/parent/dashboard?from=%2Fstudent%2Flearning%2Ftextbooks&reason=forbidden",
"errors": [],
"warnings": []
},
"checks": [
{
"name": "parent 无权限访问教师教材页被正确拦截",
"passed": true,
"detail": "重定向到 http://localhost:3000/parent/dashboard?from=%2Fteacher%2Ftextbooks&reason=forbidden"
},
{
"name": "parent 访问学生端教材页被拦截(符合预期)",
"passed": true,
"detail": "重定向到 http://localhost:3000/parent/dashboard?from=%2Fstudent%2Flearning%2Ftextbooks&reason=forbidden"
}
],
"screenshots": [
"access_parent_teacher_list.png",
"access_parent_student_list.png"
]
}
},
"teacher_features": {
"role": "teacher",
"features": {
"list": {
"name": "列表页",
"status": "passed",
"checks": [
{
"name": "页面标题包含'教材'/'Textbook'",
"passed": true,
"detail": "body 长度 210341"
},
{
"name": "存在'新建教材'按钮",
"passed": true,
"detail": "找到 1 个"
},
{
"name": "存在筛选器",
"passed": true,
"detail": "找到 2 个 input/select"
},
{
"name": "教材卡片或空状态",
"passed": true,
"detail": "找到 6 个教材链接"
}
],
"errors": []
},
"filter": {
"name": "筛选",
"status": "passed",
"checks": [
{
"name": "搜索筛选触发 URL 参数更新",
"passed": true,
"detail": "URL=http://localhost:3000/teacher/textbooks?q=%E6%95%B0%E5%AD%A6"
},
{
"name": "学科筛选下拉选项出现",
"passed": true,
"detail": "找到 9 个选项"
}
],
"errors": []
},
"create": {
"name": "新建教材",
"status": "passed",
"checks": [
{
"name": "新建教材对话框打开",
"passed": true,
"detail": "找到 1 个对话框"
},
{
"name": "教材创建成功toast 或列表显示)",
"passed": true,
"detail": "toast=True, in_list=True"
}
],
"errors": []
},
"detail": {
"name": "教材详情页",
"status": "passed",
"checks": [
{
"name": "详情页 HTTP 200",
"passed": true,
"detail": "HTTP 200"
},
{
"name": "存在返回按钮",
"passed": true,
"detail": "找到 1 个"
},
{
"name": "存在设置按钮",
"passed": true,
"detail": "找到 1 个"
},
{
"name": "存在 Tab 切换(章节/知识点/图谱)",
"passed": true,
"detail": "找到 3 个 Tab"
},
{
"name": "章节侧边栏渲染",
"passed": true,
"detail": "找到 0 个章节元素"
}
],
"errors": []
},
"chapter": {
"name": "章节功能",
"status": "passed",
"checks": [
{
"name": "存在新建章节按钮",
"passed": false,
"detail": "找到 0 个"
},
{
"name": "章节列表渲染",
"passed": true,
"detail": "找到 0 个章节元素"
},
{
"name": "内容面板渲染",
"passed": false,
"detail": "找到 0 个内容元素"
}
],
"errors": []
},
"graph": {
"name": "知识图谱",
"status": "warning",
"checks": [
{
"name": "图谱 Tab 可点击",
"passed": false,
"detail": "图谱 Tab 处于 disabled 状态(可能无章节可选)"
}
],
"errors": []
},
"settings": {
"name": "设置对话框",
"status": "passed",
"checks": [
{
"name": "设置对话框打开",
"passed": true,
"detail": "找到 1 个对话框"
},
{
"name": "标题输入框存在且有默认值",
"passed": true,
"detail": "找到 1 个"
},
{
"name": "存在删除按钮",
"passed": true,
"detail": "找到 1 个"
}
],
"errors": []
},
"delete": {
"name": "删除教材",
"status": "passed",
"checks": [
{
"name": "删除后跳转回列表页",
"passed": false,
"detail": "URL=http://localhost:3000/teacher/textbooks/bl9rs9g8r2qbker2vpi6mztp"
}
],
"errors": []
}
},
"screenshots": [
"teacher_feature_list.png",
"teacher_feature_filter.png",
"teacher_feature_create_form.png",
"teacher_feature_detail.png",
"teacher_feature_chapter.png",
"teacher_feature_settings.png"
],
"errors": [],
"warnings": [],
"created_textbook_id": "bl9rs9g8r2qbker2vpi6mztp"
},
"student_features": {
"role": "student",
"features": {
"list": {
"name": "学生列表页",
"status": "passed",
"checks": [
{
"name": "页面标题包含'教材'/'Textbook'",
"passed": true,
"detail": "body 长度 353764"
},
{
"name": "学生端无'新建教材'按钮",
"passed": true,
"detail": "找到 0 个(应为 0"
},
{
"name": "存在筛选器",
"passed": true,
"detail": "找到 4 个筛选元素"
},
{
"name": "教材卡片或空状态",
"passed": true,
"detail": "找到 7 个教材链接"
}
],
"errors": []
},
"filter": {
"name": "学生筛选",
"status": "passed",
"checks": [
{
"name": "搜索筛选触发 URL 参数更新",
"passed": true,
"detail": "URL=http://localhost:3000/student/learning/textbooks?q=%E6%95%B0%E5%AD%A6"
}
],
"errors": []
},
"detail": {
"name": "学生详情页",
"status": "passed",
"checks": [
{
"name": "详情页 HTTP 200",
"passed": true,
"detail": "HTTP 200"
},
{
"name": "章节侧边栏渲染",
"passed": true,
"detail": "找到 0 个章节元素"
},
{
"name": "存在 Tab 切换",
"passed": false,
"detail": "找到 0 个 Tab"
},
{
"name": "学生端无编辑按钮",
"passed": true,
"detail": "找到 0 个(应为 0"
},
{
"name": "学生端无设置按钮",
"passed": true,
"detail": "找到 0 个(应为 0"
}
],
"errors": []
},
"graph": {
"name": "学生知识图谱",
"status": "warning",
"checks": [],
"errors": [
"未找到图谱 Tab"
]
}
},
"screenshots": [
"student_feature_list.png",
"student_feature_detail.png"
],
"errors": [],
"warnings": []
},
"console_errors_global": []
}