Initial commit of the Playwright test framework, including: - Configuration files for Playwright, Docker, and Sauce Labs - Test case structure and page object models - CI/CD pipeline configuration - Utilities and business logic implementations This framework will be used for end-to-end testing of the FMG application.
22 lines
No EOL
589 B
TypeScript
22 lines
No EOL
589 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;
|
|
this.url = process.env['BASE_URL']!;
|
|
}
|
|
|
|
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']!);
|
|
}
|
|
} |