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
@@ -92,12 +92,12 @@ export class TestDataManager {
await this.page.goto('/system/config');
await this.page.waitForLoadState('networkidle');
const testRows = this.page.locator('.el-table__row').filter({ hasText: 'test' });
const testRows = this.page.locator('.ant-table__row').filter({ hasText: 'test' });
const count = await testRows.count();
for (let i = 0; i < count; i++) {
const row = testRows.nth(i);
const deleteButton = row.locator('.el-button--danger').first();
const deleteButton = row.locator('.ant-btn--danger').first();
if (await deleteButton.isVisible()) {
await deleteButton.click();
@@ -121,12 +121,12 @@ export class TestDataManager {
await this.page.goto('/system/notice');
await this.page.waitForLoadState('networkidle');
const testRows = this.page.locator('.el-table__row').filter({ hasText: '测试通知' });
const testRows = this.page.locator('.ant-table__row').filter({ hasText: '测试通知' });
const count = await testRows.count();
for (let i = 0; i < count; i++) {
const row = testRows.nth(i);
const deleteButton = row.locator('.el-button--danger').first();
const deleteButton = row.locator('.ant-btn--danger').first();
if (await deleteButton.isVisible()) {
await deleteButton.click();
@@ -150,12 +150,12 @@ export class TestDataManager {
await this.page.goto('/files');
await this.page.waitForLoadState('networkidle');
const testRows = this.page.locator('.el-table__row').filter({ hasText: 'test' });
const testRows = this.page.locator('.ant-table__row').filter({ hasText: 'test' });
const count = await testRows.count();
for (let i = 0; i < count; i++) {
const row = testRows.nth(i);
const deleteButton = row.locator('.el-button--danger').first();
const deleteButton = row.locator('.ant-btn--danger').first();
if (await deleteButton.isVisible()) {
await deleteButton.click();