|
|
@@ -34,8 +34,8 @@ export class UserManagementPage {
|
|
|
}
|
|
|
|
|
|
async expectToBeVisible() {
|
|
|
- // 等待页面完全加载
|
|
|
- await this.page.waitForSelector('text=用户管理', { state: 'visible', timeout: 10000 });
|
|
|
+ // 等待页面完全加载,使用更精确的选择器
|
|
|
+ await this.page.waitForSelector('h1:has-text("用户管理")', { state: 'visible', timeout: 15000 });
|
|
|
await expect(this.pageTitle).toBeVisible();
|
|
|
await expect(this.createUserButton).toBeVisible();
|
|
|
await expect(this.userTable).toBeVisible();
|