fix: optimize all Page Object navigation with better error handling
- MenuManagementPage: add tree/table wait and error handling - SystemConfigPage: add table wait and error handling - DictionaryManagementPage: add table wait and error handling - FileManagementPage: add table wait and error handling - OperationLogPage: add table wait and error handling - LoginLogPage: add table wait and error handling - ExceptionLogPage: add table wait and error handling
This commit is contained in:
@@ -16,8 +16,20 @@ export class OperationLogPage {
|
||||
}
|
||||
|
||||
async goto() {
|
||||
await this.page.goto('/oplog');
|
||||
await this.page.waitForLoadState('networkidle');
|
||||
try {
|
||||
console.log('导航到操作日志页面...');
|
||||
await this.page.goto('/oplog');
|
||||
|
||||
await this.page.waitForLoadState('networkidle');
|
||||
await this.table.waitFor({ state: 'visible', timeout: 10000 });
|
||||
await expect(this.page).toHaveURL(/.*oplog/);
|
||||
|
||||
console.log('操作日志页面加载完成');
|
||||
} catch (error) {
|
||||
await this.page.screenshot({ path: `test-results/operation-log-error-${Date.now()}.png` });
|
||||
console.error('导航到操作日志页面失败:', error);
|
||||
throw new Error(`导航到操作日志页面失败: ${error instanceof Error ? error.message : String(error)}`);
|
||||
}
|
||||
}
|
||||
|
||||
async searchByKeyword(keyword: string) {
|
||||
|
||||
Reference in New Issue
Block a user