fix: improve scroll section waiting logic
This commit is contained in:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user