DigitalConsumer.FixMyGlass/playwright-tests/pages/BaseHomepage.ts
maguire-arman 458e552d6b Removes URL declaration from page classes
Removes the explicit URL declaration from the page classes.

The URL validation and navigation are now handled directly within the tests, providing greater flexibility and control over test execution and removing the need to manage URLs within each page object.
2025-07-14 16:13:56 -04:00

21 lines
No EOL
544 B
TypeScript

import { Page, Locator } from '@playwright/test';
import { BasePage } from './BasePage';
export abstract class BaseHomePage extends BasePage {
readonly page: Page;
readonly url: string;
constructor(page: Page) {
super(page);
this.page = page;
}
abstract letsGetStarted(zip?: string): Promise<void>;
// Method to check if this is the correct homepage variant
abstract isCurrentVariant(): Promise<boolean>;
async goto() {
await this.page.goto(process.env['BASE_URL']!);
}
}