fix(login): move remember password below submit

This commit is contained in:
2026-08-21 00:46:57 +08:00
parent eedd20d061
commit 4d512b15f6
4 changed files with 69 additions and 5 deletions

View File

@@ -35,6 +35,17 @@ test.describe('Makelore Electron smoke flows', () => {
.toHaveAttribute('aria-selected', 'true');
await expect(page.getByLabel('用户名', { exact: true })).toBeVisible();
await expect(page.getByLabel('密码', { exact: true })).toBeVisible();
const loginButton = page.getByRole('button', { name: '登录', exact: true });
const rememberPasswordCheckbox = page.getByRole('checkbox', { name: '记住密码', exact: true });
await expect(rememberPasswordCheckbox).toBeVisible();
const [loginButtonBox, rememberPasswordBox] = await Promise.all([
loginButton.boundingBox(),
rememberPasswordCheckbox.boundingBox(),
]);
if (!loginButtonBox || !rememberPasswordBox) {
throw new Error('Login controls did not produce visible bounds');
}
expect(rememberPasswordBox.y).toBeGreaterThan(loginButtonBox.y + loginButtonBox.height);
await expect(page.getByRole('button', { name: '在浏览器中继续', exact: true })).toHaveCount(0);
});