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

- 更新 Page Object 模型适配新字段名
- 新增 UAT 测试套件与 journey 测试用例
- 优化测试辅助工具与数据工厂
- 更新 playwright 认证状态
This commit is contained in:
张翔
2026-05-06 14:17:51 +08:00
committed by zhangxiang
parent 9e635b1483
commit e8f51309e5
47 changed files with 1764 additions and 1226 deletions
@@ -111,11 +111,11 @@ test.describe('通知管理工作流', () => {
const deleteBtn = firstRow.getByRole('button', { name: '删除' });
if (await deleteBtn.isVisible({ timeout: 3000 }).catch(() => false)) {
await deleteBtn.click();
const confirmBtn = page.locator('.el-message-box');
const confirmBtn = page.locator('.ant-message-box');
await confirmBtn.waitFor({ state: 'visible', timeout: 3000 });
await test.step('确认删除', async () => {
const confirmBtn = page.locator('.el-message-box').getByRole('button', { name: '确定' });
const confirmBtn = page.locator('.ant-message-box').getByRole('button', { name: '确定' });
if (await confirmBtn.isVisible({ timeout: 2000 }).catch(() => false)) {
await confirmBtn.click();
await page.waitForLoadState('networkidle');
@@ -123,7 +123,7 @@ test.describe('通知管理工作流', () => {
});
await test.step('验证删除成功', async () => {
const messageBox = page.locator('.el-message-box');
const messageBox = page.locator('.ant-message-box');
await expect(messageBox).not.toBeVisible({ timeout: 5000 });
console.log(`通知已删除`);
});