修复认证页 Tab 焦点顺序 05-26-oa-auth-layout-wecom-login-ux

这个提交包含在:
2026-05-27 12:04:46 +08:00
父节点 b511515bc6
当前提交 2a11ab9da8
共修改 5 个文件,包含 51 行新增和 10 行删除
+14 -10
查看文件
@@ -239,21 +239,25 @@ export function LoginPage() {
/>
</div>
<div className="space-y-2">
<div className="flex items-center justify-between gap-3">
<div className="grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-3 gap-y-2">
<div className="col-start-1 row-start-1">
<Label htmlFor="login-password">密码</Label>
</div>
<div className="col-span-2 row-start-2">
<PasswordInput
autoComplete="current-password"
data-testid="login-password"
id="login-password"
onChange={(event) => setPassword(event.target.value)}
placeholder="请输入密码"
value={password}
/>
</div>
<div className="col-start-2 row-start-1 justify-self-end">
<Link className="text-sm font-medium text-primary hover:underline" to="/forgot-password">
忘记密码?
</Link>
</div>
<PasswordInput
autoComplete="current-password"
data-testid="login-password"
id="login-password"
onChange={(event) => setPassword(event.target.value)}
placeholder="请输入密码"
value={password}
/>
</div>
{error ? <div className="rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-600">{error}</div> : null}
+3
查看文件
@@ -348,6 +348,9 @@ test("登录页提供找回密码、密码显隐,PWA 更新不会清空正在
await page.goto("/login");
await page.getByTestId("login-identifier").fill("[email protected]");
await page.getByTestId("login-identifier").focus();
await page.keyboard.press("Tab");
await expect(page.getByTestId("login-password")).toBeFocused();
await page.getByTestId("login-password").fill("PasswordA1234");
await expect(page.getByTestId("login-password")).toHaveAttribute("type", "password");