DigitalConsumer.FixMyGlass/playwright-tests/pages/ServiceZipPage.ts
2025-05-23 11:58:33 -04:00

22 lines
No EOL
915 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";
import { ProgressBarPercentages } from "@business-logic/types/Enums";
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.validateProgressBar(ProgressBarPercentages.ServiceZipPage);
await this.enterZip(customerDetails!.address.postalCode!);
await this.handleZipValidation(customerDetails!.address.postalCode!, vehicleDetails!.vehicleLookupType!, alertFlags!);
}
}