test: E2E 测试用例更新与新增
- 更新 Page Object 模型适配新字段名 - 新增 UAT 测试套件与 journey 测试用例 - 优化测试辅助工具与数据工厂 - 更新 playwright 认证状态
This commit is contained in:
@@ -9,11 +9,11 @@ test.describe('文件管理工作流', () => {
|
||||
await page.locator('text=系统管理').click();
|
||||
await page.waitForTimeout(500);
|
||||
|
||||
await page.locator('.el-menu-item:has-text("文件管理")').click();
|
||||
await page.locator('.ant-menu-item:has-text("文件管理")').click();
|
||||
await page.waitForLoadState('networkidle');
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await expect(page.locator('.el-table')).toBeVisible({ timeout: 10000 });
|
||||
await expect(page.locator('.ant-table')).toBeVisible({ timeout: 10000 });
|
||||
});
|
||||
|
||||
await test.step('上传文件', async () => {
|
||||
@@ -30,7 +30,7 @@ test.describe('文件管理工作流', () => {
|
||||
});
|
||||
|
||||
await test.step('验证文件上传成功', async () => {
|
||||
const successMessage = page.locator('.el-message--success');
|
||||
const successMessage = page.locator('.ant-message-success');
|
||||
if (await successMessage.isVisible()) {
|
||||
expect(await successMessage.textContent()).toContain('成功');
|
||||
}
|
||||
@@ -54,10 +54,10 @@ test.describe('文件管理工作流', () => {
|
||||
});
|
||||
|
||||
await test.step('按类型筛选', async () => {
|
||||
const typeFilter = page.locator('.el-select:has-text("类型")');
|
||||
const typeFilter = page.locator('.ant-select:has-text("类型")');
|
||||
if (await typeFilter.isVisible()) {
|
||||
await typeFilter.click();
|
||||
await page.locator('.el-select-dropdown__item').first().click();
|
||||
await page.locator('.ant-select-item').first().click();
|
||||
await page.waitForTimeout(1000);
|
||||
}
|
||||
});
|
||||
@@ -71,7 +71,7 @@ test.describe('文件管理工作流', () => {
|
||||
});
|
||||
|
||||
await test.step('选择文件', async () => {
|
||||
const fileCheckbox = page.locator('.el-checkbox').first();
|
||||
const fileCheckbox = page.locator('.ant-checkbox').first();
|
||||
if (await fileCheckbox.isVisible()) {
|
||||
await fileCheckbox.click();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user