From 55868d4c491ae029cc44f35d593a38cdeb321fe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=BF=94?= Date: Fri, 27 Feb 2026 11:23:04 +0800 Subject: [PATCH] fix: improve scroll section waiting logic --- e2e/src/pages/HomePage.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/e2e/src/pages/HomePage.ts b/e2e/src/pages/HomePage.ts index a8bdccb..65d59e4 100644 --- a/e2e/src/pages/HomePage.ts +++ b/e2e/src/pages/HomePage.ts @@ -85,8 +85,10 @@ export class HomePage extends BasePage { async scrollToSection(sectionId: string): Promise { 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 {