import { Page } from '@playwright/test'; import { BasePage } from './BasePage'; import { getPageConfig } from '../config/test-pages'; import { TestConfig } from '../types'; export class HomePage extends BasePage { constructor(page: Page, config?: TestConfig) { const pageConfig = getPageConfig('home'); super(page, pageConfig.url, config); } async getHeroTitle(): Promise { return await this.getText('h1'); } async getFeaturesSection(): Promise { return await this.isVisible('.features-section'); } async navigateToAbout(): Promise { await this.click('a[href="/about"]'); } async navigateToContact(): Promise { await this.click('a[href="/contact"]'); } async navigateToProducts(): Promise { await this.click('a[href="/products"]'); } }