test: E2E 测试用例更新与新增
- 更新 Page Object 模型适配新字段名 - 新增 UAT 测试套件与 journey 测试用例 - 优化测试辅助工具与数据工厂 - 更新 playwright 认证状态
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user