test: E2E 测试用例更新与新增

- 更新 Page Object 模型适配新字段名
- 新增 UAT 测试套件与 journey 测试用例
- 优化测试辅助工具与数据工厂
- 更新 playwright 认证状态
This commit is contained in:
张翔
2026-05-06 14:17:51 +08:00
parent 0b246b3e24
commit bd21e2d1f7
47 changed files with 1764 additions and 1226 deletions
+7 -7
View File
@@ -211,7 +211,7 @@ export class TestHelpers {
}
static async waitForSuccessMessage(page: Page, timeout: number = 5000): Promise<boolean> {
const successMessage = page.locator('.el-message--success, .success-message, [class*="success"]');
const successMessage = page.locator('.ant-message-success, .success-message, [class*="success"]');
try {
await successMessage.waitFor({ state: 'visible', timeout });
return true;
@@ -221,7 +221,7 @@ export class TestHelpers {
}
static async waitForErrorMessage(page: Page, timeout: number = 5000): Promise<boolean> {
const errorMessage = page.locator('.el-message--error, .error-message, [class*="error"]');
const errorMessage = page.locator('.ant-message-error, .error-message, [class*="error"]');
try {
await errorMessage.waitFor({ state: 'visible', timeout });
return true;
@@ -231,7 +231,7 @@ export class TestHelpers {
}
static async waitForLoadingComplete(page: Page, timeout: number = 10000): Promise<void> {
const loadingSpinner = page.locator('.el-loading-mask, .loading, [class*="loading"]');
const loadingSpinner = page.locator('.ant-spin-container, .loading, [class*="loading"]');
try {
await loadingSpinner.waitFor({ state: 'visible', timeout: 2000 });
@@ -242,7 +242,7 @@ export class TestHelpers {
}
static async waitForModal(page: Page, timeout: number = 5000): Promise<boolean> {
const modal = page.locator('.el-dialog, .modal, [role="dialog"]');
const modal = page.locator('.ant-modal, .modal, [role="dialog"]');
try {
await modal.waitFor({ state: 'visible', timeout });
return true;
@@ -252,7 +252,7 @@ export class TestHelpers {
}
static async closeModal(page: Page): Promise<boolean> {
const closeButton = page.locator('.el-dialog__close, .modal-close, button[aria-label="Close"]');
const closeButton = page.locator('.ant-modal__close, .modal-close, button[aria-label="Close"]');
try {
await closeButton.click();
return true;
@@ -262,7 +262,7 @@ export class TestHelpers {
}
static async waitForSelectDropdown(page: Page, timeout: number = 5000): Promise<boolean> {
const dropdown = page.locator('.el-select-dropdown, .select-dropdown');
const dropdown = page.locator('.ant-select-dropdown, .select-dropdown');
try {
await dropdown.waitFor({ state: 'visible', timeout });
return true;
@@ -272,7 +272,7 @@ export class TestHelpers {
}
static async selectFromDropdown(page: Page, value: string): Promise<boolean> {
const option = page.locator('.el-select-dropdown__item, .select-option').filter({ hasText: value });
const option = page.locator('.ant-select-item, .select-option').filter({ hasText: value });
try {
await option.click();
return true;