DigitalConsumer.FixMyGlass/playwright-tests/pages/ServiceZipPage.ts
maguire-arman a2ca9134d1 Initializes Playwright test framework
Sets up the core infrastructure for Playwright-based automated testing, including:
- Docker support for consistent environments
- Azure Pipelines configuration for CI/CD
- Page Object Model structure for maintainable tests
- Test data, validation, and rule engine implementation
- Test configuration for alerts and other scenarios
2025-05-08 15:45:05 -04:00

20 lines
No EOL
766 B
TypeScript

import { Page } from "@playwright/test";
import { LookupPage } from "./LookupPage";
import { step } from "@business-logic/types/Step";
import { ITestData } from "@business-logic/types/ITestData";
export class ServiceZipPage extends LookupPage {
url = process.env['BASE_URL']! + '/fmg/?fmgPage=service-zip';
constructor(page: Page) {
super(page);
}
@step("ZipLookupPage >> Lookup by service ZIP: ")
async handleServiceZipPage(testData: Partial<ITestData>) {
const { customerDetails, vehicleDetails, alertFlags } = testData;
await this.enterZip(customerDetails!.address.postalCode!);
await this.handleZipValidation(customerDetails!.address.postalCode!, vehicleDetails!.vehicleLookupType!, alertFlags!);
}
}