fix: improve scroll section waiting logic

This commit is contained in:
张翔
2026-02-27 11:23:04 +08:00
parent 0c7a7f5b05
commit 55868d4c49
+3 -1
View File
@@ -85,8 +85,10 @@ export class HomePage extends BasePage {
async scrollToSection(sectionId: string): Promise<void> {
const section = this.page.locator(`#${sectionId}`);
await section.waitFor({ state: 'attached', timeout: 10000 });
await section.scrollIntoViewIfNeeded();
await this.page.waitForTimeout(500);
await this.page.waitForLoadState('networkidle');
await this.page.waitForTimeout(1000);
}
async isSectionVisible(sectionId: string): Promise<boolean> {