Commit Graph

5 Commits

Author SHA1 Message Date
weli f4429d1cac test: add teacherless student redirect test + fix flaky role switch tests
- Fix action sheet item selection to use nth() instead of hasText filter
  (role names use "教师" not "老师" in action sheet, and hasText caused
  multiple matches with "主管教师")
- Add waitFor for action sheet animation to fix visibility race condition
- Add test: teacherless student auto-redirect to /student/teacher-select
  via API route interception

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 02:04:16 +08:00
weli e1ffb9c471 test: add E2E tests for teacher selection flow and role switch
- Add test: switching from teacher to student auto-selects teacher
- Add test: teacher selection doesn't loop back to org select
- Update existing tests to verify auto-select behavior
- Verify teacher name displayed (not "未选择老师") on profile

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 01:18:19 +08:00
weli 73cb51a384 fix: E2E teacher-switching test - explicitly select STUDENT role
establishSession picks the first role (测试员), but the test needs
STUDENT role. Rewrote helper to click "学生" explicitly and wait for
SPA to settle before assertions.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 00:39:22 +08:00
weli d53c21605d fix: explicitly select student role in teacher-switching E2E
User has multiple roles, first grid item may not be STUDENT.
Add loginAsStudent helper to find and click the "学生" role.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 23:55:49 +08:00
weli c23ef9c10a test: add E2E tests for student teacher switching
Verify profile shows current teacher, teacher switching flow,
and my teachers list displays correctly.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 23:50:46 +08:00