Fix the e2e first-login gate flow and admin hint locator #128

Merged
weichen merged 3 commits from fix/e2e-gate-flow into main 2026-10-23 10:20:16 +00:00
Owner

Why: The e2e login helpers' first-login gate detection is stale: they probe for the text '修改密码' and click '设置新密码并进入', but the current ChangePasswordGate renders '设置新密码' (fields 当前密码/新密码(≥8 位)/确认新密码, button 设置新密码) followed by a '密码已更新' + '返回登录' re-login screen. The mismatch sent the helpers down the wrong branch, timing out on the login form; the admin-user-create hint locator also hit a strict-mode violation (multiple .ad-hint elements).

Change: gate detection via getByRole('heading', { name: '设置新密码' }); complete the gate (current password when present, new password twice, submit, expect 密码已更新, return to login, re-login with the new password); scope the admin-create hint assertion to the 初始密码 hint.

Evidence: verified against the real combo via Dev scripts/e2e.sh — Playwright 13 passed + 2 passed (plain-base/changepw), 4 designed skips, exit 0 (Dev receipt w12-e2e-16.json).

Impact: e2e specs only.

Refs: W10 audit workspace (PR #125); two-trees W12 browser matrix.

Why: The e2e login helpers' first-login gate detection is stale: they probe for the text '修改密码' and click '设置新密码并进入', but the current ChangePasswordGate renders '设置新密码' (fields 当前密码/新密码(≥8 位)/确认新密码, button 设置新密码) followed by a '密码已更新' + '返回登录' re-login screen. The mismatch sent the helpers down the wrong branch, timing out on the login form; the admin-user-create hint locator also hit a strict-mode violation (multiple .ad-hint elements). Change: gate detection via getByRole('heading', { name: '设置新密码' }); complete the gate (current password when present, new password twice, submit, expect 密码已更新, return to login, re-login with the new password); scope the admin-create hint assertion to the 初始密码 hint. Evidence: verified against the real combo via Dev scripts/e2e.sh — Playwright 13 passed + 2 passed (plain-base/changepw), 4 designed skips, exit 0 (Dev receipt w12-e2e-16.json). Impact: e2e specs only. Refs: W10 audit workspace (PR #125); two-trees W12 browser matrix.
weichen added 3 commits 2026-10-23 09:59:13 +00:00
weichen merged commit d643145739 into main 2026-10-23 10:20:16 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Frontend#128