diff --git a/playwright-tests/framework/TestPages.ts b/playwright-tests/framework/TestPages.ts index b0baf2db1..c2cc04b35 100644 --- a/playwright-tests/framework/TestPages.ts +++ b/playwright-tests/framework/TestPages.ts @@ -24,7 +24,7 @@ import { CCPolicyInfoPage } from "../pages/CCPolicyInfoPage" import { DuplicateCheckPage } from "../pages/DuplicateCheckPage" import { PolicyVehiclesPage } from "../pages/PolicyVehiclesPage" import { PolicyInfoSubmittedPage } from "../pages/PolicyInfoSubmittedPage" -import { ProblemGlassQuestionsPage } from "../pages/ProblemGlassQuestionsPage" +import { HeritageProblemGlassQuestionsPage } from "../pages/HeritageProblemGlassQuestionsPage" import RecalibrationInfoPage from "../pages/RecalibrationInfoPage" import { CoverageStatementPage } from "../pages/CoverageStatementPage" import { VerifyDetailsPage } from "../pages/VerifyDetailsPage" @@ -49,7 +49,7 @@ export interface ITestPages { paymentMethodPage: PaymentMethodPage, policyInfoSubmittedPage: PolicyInfoSubmittedPage, policyVehiclesPage: PolicyVehiclesPage, - problemGlassQuestionsPage: ProblemGlassQuestionsPage, + heritageProblemGlassQuestionsPage: HeritageProblemGlassQuestionsPage, recalibrationInfoPage: RecalibrationInfoPage, schedulePage: SchedulePage, mobileDetailsPage: MobileDetailsPage, @@ -85,7 +85,7 @@ export const createTestPages: TestPagesFactory = (page: Page) => { paymentMethodPage: new PaymentMethodPage(page), policyInfoSubmittedPage: new PolicyInfoSubmittedPage(page), policyVehiclesPage: new PolicyVehiclesPage(page), - problemGlassQuestionsPage: new ProblemGlassQuestionsPage(page), + heritageProblemGlassQuestionsPage: new HeritageProblemGlassQuestionsPage(page), recalibrationInfoPage: new RecalibrationInfoPage(page), schedulePage: new SchedulePage(page), mobileDetailsPage: new MobileDetailsPage(page), diff --git a/playwright-tests/pages/ProblemGlassQuestionsPage.ts b/playwright-tests/pages/HeritageProblemGlassQuestionsPage.ts similarity index 81% rename from playwright-tests/pages/ProblemGlassQuestionsPage.ts rename to playwright-tests/pages/HeritageProblemGlassQuestionsPage.ts index e875ed262..097fd5200 100644 --- a/playwright-tests/pages/ProblemGlassQuestionsPage.ts +++ b/playwright-tests/pages/HeritageProblemGlassQuestionsPage.ts @@ -1,10 +1,9 @@ import { expect, type Locator, type Page } from '@playwright/test'; -import { IClaimDetails, ICustomerDetails } from 'safelite-playwright-core'; import { InsuranceBasePage } from './InsuranceBasePage'; import { ITestData } from 'framework/TestData'; import { step } from 'framework/localTypes/Step'; -export class ProblemGlassQuestionsPage extends InsuranceBasePage { +export class HeritageProblemGlassQuestionsPage extends InsuranceBasePage { readonly provideVinManuallyButton: Locator; readonly provideLicensePlateButton: Locator; readonly provideHomeAddressButton: Locator; @@ -32,9 +31,9 @@ export class ProblemGlassQuestionsPage extends InsuranceBasePage { } - @step("ProblemGlassQuestionsPage >> Handle VIN popup and answer glass question") - - async handleproblemGlassQuestionsPage(testData: Partial){ + @step("HeritageProblemGlassQuestionsPage >> Handle VIN popup and answer glass question on heritage") + // Handles OEM scenario with vehicle that has only one glass question + async handleHeritageProblemGlassQuestionsPage(testData: Partial){ await this.dontShareVinButton.click(); await this.yestoGlassQuestionButton.click(); diff --git a/playwright-tests/pages/OrderConfirmationPage.ts b/playwright-tests/pages/OrderConfirmationPage.ts index 6bf10926c..a65c80fd2 100644 --- a/playwright-tests/pages/OrderConfirmationPage.ts +++ b/playwright-tests/pages/OrderConfirmationPage.ts @@ -47,7 +47,7 @@ export class OrderConfirmationPage extends BasePage { async validateOrderConfirmationPage(testData: Partial) { // Destructure data we use const { vehicleDetails, customerDetails, servicePackage, isCashInsuranceFlow, - isPolicyFound, claimDetails, paymentDetails, isUseVehicleOnPolicy, paymentMethod, isPolicyUnverified, isOEM } = testData; + isPolicyFound, claimDetails, paymentDetails, isUseVehicleOnPolicy, paymentMethod, isPolicyUnverified} = testData; await this.serviceText.waitFor({ state: "visible" }); Soft.expect((await this.getActualAppointmentSummary()).map(item => item.toLowerCase())).toEqual((await this.getExpectedAppointmentSummary(testData)).map(item => item.toLowerCase())); diff --git a/playwright-tests/tests/0000__M.test.ts b/playwright-tests/tests/0000__M.test.ts index 4209daad6..4f0bbe6bf 100644 --- a/playwright-tests/tests/0000__M.test.ts +++ b/playwright-tests/tests/0000__M.test.ts @@ -338,8 +338,8 @@ export async function handleInsuranceFlow(testCase: TestCase) { if (isOEM) { // User should be on heritage problem glass questions page after selecting Allstate on insurance company page if (testCase.testData.isOEM === true) { - let problemGlassQuestionsPage = testCase.pages.problemGlassQuestionsPage; - await problemGlassQuestionsPage.handleproblemGlassQuestionsPage(testCase.testData); + let HeritageProblemGlassQuestionsPage = testCase.pages.heritageProblemGlassQuestionsPage; + await HeritageProblemGlassQuestionsPage.handleHeritageProblemGlassQuestionsPage(testCase.testData); } }