|
@@ -22,7 +22,7 @@ export class AdminLoginPage {
|
|
|
this.usernameInput = page.getByPlaceholder('请输入用户名');
|
|
this.usernameInput = page.getByPlaceholder('请输入用户名');
|
|
|
this.passwordInput = page.getByPlaceholder('请输入密码');
|
|
this.passwordInput = page.getByPlaceholder('请输入密码');
|
|
|
this.submitButton = page.getByRole('button', { name: '登录' });
|
|
this.submitButton = page.getByRole('button', { name: '登录' });
|
|
|
- this.togglePasswordButton = page.locator('button:has(img), [aria-label*="密码"], [aria-label*="显示"], [aria-label*="隐藏"]').nth(1);
|
|
|
|
|
|
|
+ this.togglePasswordButton = page.locator('button:has(svg)').nth(1);
|
|
|
this.pageTitle = page.getByRole('heading', { name: '管理后台登录' });
|
|
this.pageTitle = page.getByRole('heading', { name: '管理后台登录' });
|
|
|
this.welcomeText = page.getByText('请输入您的账号和密码继续操作');
|
|
this.welcomeText = page.getByText('请输入您的账号和密码继续操作');
|
|
|
this.successToast = page.locator('[data-sonner-toast][data-type="success"]');
|
|
this.successToast = page.locator('[data-sonner-toast][data-type="success"]');
|
|
@@ -31,8 +31,8 @@ export class AdminLoginPage {
|
|
|
this.passwordError = page.locator('text=请输入密码');
|
|
this.passwordError = page.locator('text=请输入密码');
|
|
|
this.testAccountInfo = page.locator('text=测试账号:');
|
|
this.testAccountInfo = page.locator('text=测试账号:');
|
|
|
this.loadingSpinner = page.locator('[aria-busy="true"], .loading-spinner, .spinner');
|
|
this.loadingSpinner = page.locator('[aria-busy="true"], .loading-spinner, .spinner');
|
|
|
- this.backgroundElement = page.locator('body, main').first();
|
|
|
|
|
- this.loginCard = page.locator('form, .card, [role="form"]').first();
|
|
|
|
|
|
|
+ this.backgroundElement = page.locator('div.flex.items-center.justify-center').first();
|
|
|
|
|
+ this.loginCard = page.locator('.card').first();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
async goto() {
|
|
async goto() {
|