修复认证页 Tab 焦点顺序 05-26-oa-auth-layout-wecom-login-ux
这个提交包含在:
+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}
|
||||
|
||||
@@ -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");
|
||||
|
||||
在新工单中引用
屏蔽一个用户