fix(login): move remember password below submit
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user