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

59
webtest/check_db.py Normal file
View File

@@ -0,0 +1,59 @@
"""检查数据库连接和账号状态"""
import os
def check_db():
try:
import mysql.connector
conn = mysql.connector.connect(
host="mysql.eazygame.cn",
port=14013,
user="root",
password="wx1998WX",
database="next_edu"
)
cursor = conn.cursor()
# 检查用户表
cursor.execute("SELECT id, email, name FROM users WHERE email LIKE '%@xiaoxue.edu.cn' LIMIT 20")
users = cursor.fetchall()
print("=== 用户列表 ===")
for u in users:
print(f" ID: {u[0]}, Email: {u[1]}, Name: {u[2]}")
# 检查用户角色关联
cursor.execute("""
SELECT u.email, r.name as role_name
FROM users u
JOIN users_to_roles utr ON u.id = utr.user_id
JOIN roles r ON utr.role_id = r.id
WHERE u.email LIKE '%@xiaoxue.edu.cn'
LIMIT 30
""")
roles = cursor.fetchall()
print("\n=== 用户角色 ===")
for r in roles:
print(f" {r[0]} -> {r[1]}")
# 检查课案表
cursor.execute("SELECT COUNT(*) FROM lesson_plans")
count = cursor.fetchone()[0]
print(f"\n=== 课案数量: {count} ===")
# 检查课案模板表
cursor.execute("SELECT COUNT(*) FROM lesson_plan_templates")
tpl_count = cursor.fetchone()[0]
print(f"=== 课案模板数量: {tpl_count} ===")
# 检查 onboarding 状态
cursor.execute("SELECT email, onboarded FROM users WHERE email IN ('admin@xiaoxue.edu.cn', 't_chinese_1@xiaoxue.edu.cn', 'student_g1c1_1@xiaoxue.edu.cn', 'parent_g1c1_1@xiaoxue.edu.cn')")
onboarded = cursor.fetchall()
print("\n=== Onboarding 状态 ===")
for o in onboarded:
print(f" {o[0]}: onboarded={o[1]}")
cursor.close()
conn.close()
except Exception as e:
print(f"❌ 数据库错误: {e}")
check_db()