fix: improve footer visibility with data-testid and waitForFooter method
This commit is contained in:
@@ -36,7 +36,7 @@ export class HomePage extends BasePage {
|
||||
this.aboutSection = page.locator('#about');
|
||||
this.newsSection = page.locator('#news');
|
||||
this.contactSection = page.locator('#contact');
|
||||
this.footer = page.locator('footer');
|
||||
this.footer = page.locator('[data-testid="footer"]');
|
||||
}
|
||||
|
||||
async getNavigationItemCount(): Promise<number> {
|
||||
@@ -147,6 +147,12 @@ export class HomePage extends BasePage {
|
||||
return await this.footer.textContent() || '';
|
||||
}
|
||||
|
||||
async waitForFooter(): Promise<void> {
|
||||
await this.scrollToBottom();
|
||||
await this.page.waitForLoadState('networkidle');
|
||||
await this.footer.waitFor({ state: 'visible', timeout: 10000 });
|
||||
}
|
||||
|
||||
async waitForHeroSection(): Promise<void> {
|
||||
await this.heroSection.waitFor({ state: 'visible', timeout: 10000 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user