fix: optimize test timeouts and wait conditions for better stability

This commit is contained in:
张翔
2026-03-05 23:00:32 +08:00
parent c678df44ae
commit c4d135d37e
3 changed files with 14 additions and 7 deletions
+3 -3
View File
@@ -68,9 +68,9 @@ export class HomePage extends BasePage {
}
async waitForPageLoad(): Promise<void> {
await this.waitForLoadState('networkidle');
await this.header.waitFor({ state: 'visible' });
await this.heroSection.waitFor({ state: 'visible' });
await this.waitForLoadState('domcontentloaded');
await this.header.waitFor({ state: 'visible', timeout: 15000 });
await this.heroSection.waitFor({ state: 'visible', timeout: 15000 });
}
async getNavigationItems(): Promise<Locator[]> {