From 368267d123c928cb6314eb0cb97699181b4a3f7f Mon Sep 17 00:00:00 2001 From: JennyNou Date: Mon, 11 May 2026 15:29:52 -0400 Subject: [PATCH 1/6] Add 2.0 policy info page --- playwright-tests/framework/TestPages.ts | 3 +++ playwright-tests/pages/PolicyInfoPage.ts | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 playwright-tests/pages/PolicyInfoPage.ts diff --git a/playwright-tests/framework/TestPages.ts b/playwright-tests/framework/TestPages.ts index bc98e44b5..54078e266 100644 --- a/playwright-tests/framework/TestPages.ts +++ b/playwright-tests/framework/TestPages.ts @@ -33,6 +33,7 @@ import { EndorsementsPage } from "../pages/EndorsementsPage" import { PolicyDriverPage } from "../pages/PolicyDriverPage" import { ServiceZipPage } from "../pages/ServiceZipPage" import { MobileDetailsPage } from "pages/MobileDetailsPage"; +import { PolicyInfoPage } from "../pages/PolicyInfoPage"; export interface ITestPages { capabilityQuestionsPage: CapabilityQuestionsPage, @@ -49,6 +50,7 @@ export interface ITestPages { orderConfirmationPage: OrderConfirmationPage, partQuestionsPage: PartQuestionsPage, paymentMethodPage: PaymentMethodPage, + policyInfoPage: PolicyInfoPage, policyInfoSubmittedPage: PolicyInfoSubmittedPage, policyVehiclesPage: PolicyVehiclesPage, heritageProblemGlassQuestionsPage: HeritageProblemGlassQuestionsPage, @@ -86,6 +88,7 @@ export const createTestPages: TestPagesFactory = (page: Page) => { orderConfirmationPage: new OrderConfirmationPage(page), partQuestionsPage: new PartQuestionsPage(page), paymentMethodPage: new PaymentMethodPage(page), + policyInfoPage: new PolicyInfoPage(page), policyInfoSubmittedPage: new PolicyInfoSubmittedPage(page), policyVehiclesPage: new PolicyVehiclesPage(page), heritageProblemGlassQuestionsPage: new HeritageProblemGlassQuestionsPage(page), diff --git a/playwright-tests/pages/PolicyInfoPage.ts b/playwright-tests/pages/PolicyInfoPage.ts new file mode 100644 index 000000000..22b6c07e7 --- /dev/null +++ b/playwright-tests/pages/PolicyInfoPage.ts @@ -0,0 +1,17 @@ +import { type Page } from '@playwright/test'; +import { BasePage } from './BasePage'; +import { step } from 'framework/localTypes/Step'; +import { ITestData } from 'framework/TestData'; + +export class PolicyInfoPage extends BasePage { + constructor(page: Page) { + super(page); + + // TODO: Add locators for the page once the card is in test (CASH-2468) + } + + @step("PolicyInfoPage >> Continue") + async handlePolicyInfoPage(testData: Partial): Promise { + await this.nextPage(); + } +} From 0e32aa0f11cf165d78ac50db753b48185a57a1ca Mon Sep 17 00:00:00 2001 From: JennyNou Date: Mon, 11 May 2026 17:12:58 -0400 Subject: [PATCH 2/6] Add Liberty Mutual test --- playwright-tests/framework/TestData.ts | 1 + playwright-tests/pages/PolicyInfoPage.ts | 5 +- playwright-tests/tests/0000__M.test.ts | 10 ++++ .../tests/InsuranceLibertyMutual.ts | 54 +++++++++++++++++++ 4 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 playwright-tests/tests/InsuranceLibertyMutual.ts diff --git a/playwright-tests/framework/TestData.ts b/playwright-tests/framework/TestData.ts index 332e3dc26..0fe04a1f9 100644 --- a/playwright-tests/framework/TestData.ts +++ b/playwright-tests/framework/TestData.ts @@ -15,6 +15,7 @@ export interface ITestData extends base { isMSRZip?: boolean, isPIAEnabled?: boolean, isDualRecal?: boolean, + isPolicyInfoPage?: boolean, } diff --git a/playwright-tests/pages/PolicyInfoPage.ts b/playwright-tests/pages/PolicyInfoPage.ts index 22b6c07e7..7974e3099 100644 --- a/playwright-tests/pages/PolicyInfoPage.ts +++ b/playwright-tests/pages/PolicyInfoPage.ts @@ -1,4 +1,4 @@ -import { type Page } from '@playwright/test'; +import { expect, type Page } from '@playwright/test'; import { BasePage } from './BasePage'; import { step } from 'framework/localTypes/Step'; import { ITestData } from 'framework/TestData'; @@ -12,6 +12,7 @@ export class PolicyInfoPage extends BasePage { @step("PolicyInfoPage >> Continue") async handlePolicyInfoPage(testData: Partial): Promise { - await this.nextPage(); + + await expect(this.page).toHaveURL(/\/fmg\/policy-info/); } } diff --git a/playwright-tests/tests/0000__M.test.ts b/playwright-tests/tests/0000__M.test.ts index 79cfc89f8..9eed669b4 100644 --- a/playwright-tests/tests/0000__M.test.ts +++ b/playwright-tests/tests/0000__M.test.ts @@ -44,6 +44,7 @@ import insuranceBigTruckVerifiedTests from "./InsuranceBigTruckVerified"; import insuranceUnverifiedTests from "./InsuranceUnverified"; import CashReplaceSplitWindshieldTests from "./CashReplaceSplitWindshield"; import insuranceMeemicNearSchoolVerifiedTests from "./InsuranceMeemicNearSchoolVerified"; +import insuranceLibertyMutualTests from "./InsuranceLibertyMutual"; import cashReplaceDualMobileMSRTests from "./CashReplaceDualMobileMSR"; import cashReplaceDualNonMSRInshopTests from "./CashReplaceDualNonMSRInshop"; @@ -101,6 +102,7 @@ const allStandardTests = [ // {name: "InsuranceGeico", tests: insuranceGeicoTests}, // {name: "InsuranceITACOptimizedPriceValidationAllState", tests: insuranceITACOptimizedPriceValidationAllStateTests} { name: "InsuranceMeemicNearSchoolVerified", tests: insuranceMeemicNearSchoolVerifiedTests }, + { name: "InsuranceLibertyMutual", tests: insuranceLibertyMutualTests }, ]; @@ -308,6 +310,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { // Insurance flow - if user selected Insurance as Payment Method if (paymentMethod == PaymentMethod.Insurance) { await handleInsuranceFlow(testCase); + if (testCase.testData.isPolicyInfoPage) return; // If Liberty Mutual and on PolicyInfoPage, skip the rest of the flow until the page is built out } //============================= SERVICE SCHEDULING ============================= @@ -364,6 +367,13 @@ async function handleInsuranceFlow(testCase: TestCase) { await HeritageProblemGlassQuestionsPage.handleHeritageProblemGlassQuestionsPage(testCase.testData); } + // Liberty Mutual route directly to PolicyInfoPage instead of CCPolicyInfoPage + if (testCase.testData.isPolicyInfoPage) { + let policyInfoPage = testCase.pages.policyInfoPage; + await policyInfoPage.handlePolicyInfoPage(testCase.testData); + return; + } + // Handle ccPolicyInfoPage let ccPolicyInfoPage = testCase.pages.ccPolicyInfoPage; await ccPolicyInfoPage.handleCCPolicyInfoPage(testCase.testData); diff --git a/playwright-tests/tests/InsuranceLibertyMutual.ts b/playwright-tests/tests/InsuranceLibertyMutual.ts new file mode 100644 index 000000000..0c89d6084 --- /dev/null +++ b/playwright-tests/tests/InsuranceLibertyMutual.ts @@ -0,0 +1,54 @@ +import { ITestData, getDefaultExperimentsData } from 'framework/TestData' +import { DamageType, VehicleLookupType, VehicleDamage } from 'safelite-playwright-core'; +import { PaymentMethod } from "framework/localTypes/Enums"; +import { ITestCase } from '../framework/Typedefs' +import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core'; + +setFakerSeedFromTestName("InsuranceLibertyMutual"); + +const insuranceLibertyMutualData: Partial = { + ...getDefaultTestData(), + + paymentMethod: PaymentMethod.Insurance, + isPolicyInfoPage: true, + + claimDetails: { + client: 'Liberty Mutual Insurance', + policyNumber: 'Mock123456LM', + policyDeductible: 0, + damageDate: new Date(new Date().setDate(new Date().getDate() - 1)).toLocaleDateString('en-US', { month: '2-digit', day: '2-digit', year: 'numeric' }), + damageCause: DamageType.Hail + }, + + // Vehicle details for truck with ZIP lookup + vehicleDetails: { + ...getDefaultTestData().vehicleDetails!, + year: '2015', + make: 'Toyota', + model: 'Tacoma Pickup', + style: '4 door crew cab', + vehicleLookupType: VehicleLookupType.Zip, + }, + + // Driver door damage instead of windshield + vehicleDamage: [ + VehicleDamage.DriverFrontDoor, + ], + + paymentDetails: {}, + + experiments: { + ...getDefaultExperimentsData() + } +}; + +const insuranceLibertyMutualTests: ITestCase[] = []; + +const tc = { + name: `InsuranceLibertyMutual`, + tags: ['@E2E', '@InsuranceLibertyMutual', '@test_report', '@Insurance'], + testData: insuranceLibertyMutualData +}; +insuranceLibertyMutualTests.push(tc); + +export default insuranceLibertyMutualTests; From 73dd248f0c1e05cd7641bd60afc9bc087d1e37c8 Mon Sep 17 00:00:00 2001 From: JennyNou Date: Thu, 14 May 2026 17:21:13 -0400 Subject: [PATCH 3/6] Add unverified big truck with labor2 fee test --- playwright-tests/pages/SchedulePage.ts | 8 +- .../InsuranceAllstateBigTruckUnverified.ts | 74 +++++++++++++++++++ 2 files changed, 78 insertions(+), 4 deletions(-) create mode 100644 playwright-tests/tests/InsuranceAllstateBigTruckUnverified.ts diff --git a/playwright-tests/pages/SchedulePage.ts b/playwright-tests/pages/SchedulePage.ts index 8d863e94f..03106fa00 100644 --- a/playwright-tests/pages/SchedulePage.ts +++ b/playwright-tests/pages/SchedulePage.ts @@ -261,11 +261,11 @@ export class SchedulePage extends BasePage { await this.waitForPageOrComponentload(); await this.validateProgressBar(ProgressBarPercentages.SchedulePage); - //Looks like an issue with the insurance flow - remove comments once fixed - /*if (testData.isHeavyTruck) { + //Labor2 fee will show for cash orders and some insurance orders but USAA will not show it + if (testData.isHeavyTruck && testData.claimDetails?.client !== 'USAA') { const vuexState = JSON.parse(await this.page.evaluate('localStorage.getItem(\'vuex\')')); - expect(vuexState.order.lineItems.supportingItems.find((item: any) => item && item.partNumber == "labor2")).toBeTruthy(); - }*/ + expect(vuexState.order.lineItems.supportingItems[0].partNumber).toBe("LABOR2"); + } if (handleMobileFirstModal) { return await this.handleMobileFirstPopUp(testData); diff --git a/playwright-tests/tests/InsuranceAllstateBigTruckUnverified.ts b/playwright-tests/tests/InsuranceAllstateBigTruckUnverified.ts new file mode 100644 index 000000000..ef374411d --- /dev/null +++ b/playwright-tests/tests/InsuranceAllstateBigTruckUnverified.ts @@ -0,0 +1,74 @@ +import { ITestData, getDefaultExperimentsData } from 'framework/TestData' +import { ServiceLocation, DamageType } from 'safelite-playwright-core'; +import { ITestCase } from '../framework/Typedefs' +import { PaymentMethod } from "framework/localTypes/Enums"; +import { VehicleLookupType } from 'safelite-playwright-core'; +import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core'; + +setFakerSeedFromTestName("InsuranceAllstateBigTruckUnverified"); + +const insuranceAllstateBigTruckUnverifiedData: Partial = { + ...getDefaultTestData(), + + paymentMethod: PaymentMethod.Insurance, + + isPolicyFound: false, + isPolicyUnverified: true, + isHeavyTruck: true, + isCanNotRecal: true, + + customerDetails: { + ...getDefaultTestData().customerDetails!, + firstName: 'Big', + lastName: 'Truck', + address: { + ...getDefaultTestData().customerDetails!.address, + city: 'Dayton', + state: 'Ohio', + postalCode: '45424' + } + }, + + claimDetails: { + client: 'Allstate', + policyNumber: 'MockUnverifiedBigTruck', + policyDeductible: "Unverified", + policyZip: '45424', + damageDate: new Date(new Date().setDate(new Date().getDate() - 1)) + .toLocaleDateString('en-US', { month: '2-digit', day: '2-digit', year: 'numeric' }), + damageCause: DamageType.Rock + }, + + vehicleDetails: { + ...getDefaultTestData().vehicleDetails!, + year: '2025', + make: 'Peterbilt', + model: '579', + style: 'conventional cab', + vin: '1XPBDP9X6SD693446', + vehicleLookupType: VehicleLookupType.Zip, + }, + + appointmentDetails: { + serviceLocation: ServiceLocation.InShop, + shopAddress: '5719 Brandt Pike, Dayton, OH 45424', + appointmentDate: getDefaultTestData().appointmentDetails?.appointmentDate + }, + + paymentDetails: {}, + + experiments: { + ...getDefaultExperimentsData() + } +} + +const insuranceAllstateBigTruckUnverifiedTests: ITestCase[] = []; + +const tc = { + name: `InsuranceAllstateBigTruckUnverified`, + tags: ['@E2E', '@InsuranceAllstateBigTruckUnverified', '@test_report', '@Insurance'], + testData: insuranceAllstateBigTruckUnverifiedData +}; +insuranceAllstateBigTruckUnverifiedTests.push(tc); + +export default insuranceAllstateBigTruckUnverifiedTests; From 27aaf2f186b29d07ecfeea9ea0892aa128aca2fc Mon Sep 17 00:00:00 2001 From: JennyNou Date: Thu, 14 May 2026 17:23:14 -0400 Subject: [PATCH 4/6] Enable unverified big truck and parts bailout tests --- playwright-tests/tests/0000__M.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/playwright-tests/tests/0000__M.test.ts b/playwright-tests/tests/0000__M.test.ts index 6ef799455..eef0709fe 100644 --- a/playwright-tests/tests/0000__M.test.ts +++ b/playwright-tests/tests/0000__M.test.ts @@ -41,6 +41,7 @@ import { getTestObject, TestCase, prepareTest, RuleEngine, TestInfo } from 'fram import { createTestPages } from "framework/TestPages"; import cashReplaceSwitchToInsuranceProgressiveNoCompTests from "./CashReplaceSwitchToInsuranceProgressiveNoComp"; import insuranceUSAABigTruckVerifiedTests from "./InsuranceUSAABigTruckVerified"; +import insuranceAllstateBigTruckUnverifiedTests from "./InsuranceAllstateBigTruckUnverified"; import partsNotFoundBailoutTests from "./PartsNotFoundBailout"; import insuranceUnverifiedTests from "./InsuranceUnverified"; import CashReplaceSplitWindshieldTests from "./CashReplaceSplitWindshield"; @@ -98,14 +99,15 @@ const allStandardTests = [ { name: "InsuranceITAC21stCentury", tests: insuranceITAC21stCenturyTests }, { name: "InsuranceNoCompProgressive", tests: insuranceNoCompProgressiveTests }, {name: "InsuranceUSAABigTruckVerified", tests: insuranceUSAABigTruckVerifiedTests}, + { name: "InsuranceAllstateBigTruckUnverified", tests: insuranceAllstateBigTruckUnverifiedTests }, { name: "InsuranceOEMAllstate", tests: insuranceOEMAllstateTests }, { name: "InsuranceUnverified", tests: insuranceUnverifiedTests }, // {name: "InsuranceGeico", tests: insuranceGeicoTests}, // {name: "InsuranceITACOptimizedPriceValidationAllState", tests: insuranceITACOptimizedPriceValidationAllStateTests} { name: "InsuranceMeemicNearSchoolVerified", tests: insuranceMeemicNearSchoolVerifiedTests }, - { name: "InsuranceLibertyMutual", tests: insuranceLibertyMutualTests }, + //{ name: "InsuranceLibertyMutual", tests: insuranceLibertyMutualTests }, // uncomment when new C&C pages are built out for this entire flow - // { name: "PartsNotFoundBailout", tests: partsNotFoundBailoutTests }, // code is not available in QA + { name: "PartsNotFoundBailout", tests: partsNotFoundBailoutTests } ]; // Alert validation scenarios From de4554c31a948f4623d64555e1ca6e31eccd7318 Mon Sep 17 00:00:00 2001 From: JennyNou Date: Thu, 14 May 2026 18:05:19 -0400 Subject: [PATCH 5/6] Add big truck test for cash scenario --- playwright-tests/pages/SchedulePage.ts | 4 +- playwright-tests/tests/0000__M.test.ts | 2 + playwright-tests/tests/CashBigTruck.ts | 64 ++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 playwright-tests/tests/CashBigTruck.ts diff --git a/playwright-tests/pages/SchedulePage.ts b/playwright-tests/pages/SchedulePage.ts index 03106fa00..9ba237a8e 100644 --- a/playwright-tests/pages/SchedulePage.ts +++ b/playwright-tests/pages/SchedulePage.ts @@ -3,7 +3,7 @@ import { BasePage } from './BasePage'; import { IAppointmentDetails, ServiceLocation } from 'safelite-playwright-core'; import { formatDate, formatTime } from 'safelite-playwright-core'; import { AppointmentTimeslot } from 'safelite-playwright-core'; -import { ProgressBarPercentages } from 'framework/localTypes/Enums'; +import { ProgressBarPercentages, PaymentMethod } from 'framework/localTypes/Enums'; import { time } from 'console'; import { step } from 'framework/localTypes/Step'; import { ITestData } from 'framework/TestData'; @@ -262,7 +262,7 @@ export class SchedulePage extends BasePage { await this.validateProgressBar(ProgressBarPercentages.SchedulePage); //Labor2 fee will show for cash orders and some insurance orders but USAA will not show it - if (testData.isHeavyTruck && testData.claimDetails?.client !== 'USAA') { + if (testData.isHeavyTruck && (testData.paymentMethod !== PaymentMethod.Insurance || testData.claimDetails?.client !== 'USAA')) { const vuexState = JSON.parse(await this.page.evaluate('localStorage.getItem(\'vuex\')')); expect(vuexState.order.lineItems.supportingItems[0].partNumber).toBe("LABOR2"); } diff --git a/playwright-tests/tests/0000__M.test.ts b/playwright-tests/tests/0000__M.test.ts index eef0709fe..58d5cc675 100644 --- a/playwright-tests/tests/0000__M.test.ts +++ b/playwright-tests/tests/0000__M.test.ts @@ -49,6 +49,7 @@ import insuranceMeemicNearSchoolVerifiedTests from "./InsuranceMeemicNearSchoolV import insuranceLibertyMutualTests from "./InsuranceLibertyMutual"; import cashReplaceDualMobileMSRTests from "./CashReplaceDualMobileMSR"; import cashReplaceDualNonMSRInshopTests from "./CashReplaceDualNonMSRInshop"; +import cashBigTruckTests from "./CashBigTruck"; const test = getTestObject(); @@ -86,6 +87,7 @@ const allStandardTests = [ { name: "CashReplaceVinMobile", tests: cashReplaceVinMobileTests }, { name: "CashReplaceWiperDropoff", tests: cashReplaceWiperDropoffTests }, { name: "CashReplaceStaticInshop", tests: cashReplaceStaticInshopTests }, + { name: "CashBigTruck", tests: cashBigTruckTests }, { name: "CashReplaceDualMobileMSR", tests: cashReplaceDualMobileMSRTests }, { name: "CashReplaceDualNonMSRInshop", tests: cashReplaceDualNonMSRInshopTests }, { name: "CashReplaceStaticMobileMSR", tests: cashReplaceStaticMobileMSRTests }, diff --git a/playwright-tests/tests/CashBigTruck.ts b/playwright-tests/tests/CashBigTruck.ts new file mode 100644 index 000000000..47daffe86 --- /dev/null +++ b/playwright-tests/tests/CashBigTruck.ts @@ -0,0 +1,64 @@ +import { ITestData, getDefaultExperimentsData } from 'framework/TestData' +import { ServiceLocation, PaymentType } from 'safelite-playwright-core'; +import { ITestCase } from '../framework/Typedefs' +import { PaymentMethod } from "framework/localTypes/Enums"; +import { VehicleLookupType } from 'safelite-playwright-core'; +import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core'; + +setFakerSeedFromTestName("CashBigTruckInshop"); + +const cashBigTruckData: Partial = { + ...getDefaultTestData(), + + paymentMethod: PaymentMethod.SelfPay, + + isHeavyTruck: true, + isCanNotRecal: true, + + customerDetails: { + ...getDefaultTestData().customerDetails!, + firstName: 'Big', + lastName: 'Truck', + address: { + ...getDefaultTestData().customerDetails!.address, + city: 'Urbancrest', + state: 'Ohio', + postalCode: '43123' + } + }, + + vehicleDetails: { + ...getDefaultTestData().vehicleDetails!, + year: '2025', + make: 'Peterbilt', + model: '579', + style: 'conventional cab', + vin: '1XPBDP9X6SD693446', + vehicleLookupType: VehicleLookupType.Vin, + }, + + appointmentDetails: { + serviceLocation: ServiceLocation.InShop, + shopAddress: '3455 Centerpoint Dr, Urbancrest, OH 43123', + appointmentDate: getDefaultTestData().appointmentDetails?.appointmentDate + }, + + paymentDetails: { + paymentType: PaymentType.PayAtService + }, + + experiments: { + ...getDefaultExperimentsData() + } +} + +const cashBigTruckTests: ITestCase[] = []; + +const tc = { + name: `CashBigTruck`, + tags: ['@E2E', '@CashBigTruck', '@test_report', '@CASH'], + testData: cashBigTruckData +}; +cashBigTruckTests.push(tc); + +export default cashBigTruckTests; From b0b96787b525807737b64aa4037bb1182bb47a28 Mon Sep 17 00:00:00 2001 From: JennyNou Date: Thu, 21 May 2026 14:21:49 -0400 Subject: [PATCH 6/6] Fix naming and test for new policy info page --- playwright-tests/framework/TestData.ts | 2 +- playwright-tests/pages/PolicyInfoPage.ts | 2 ++ playwright-tests/tests/0000__M.test.ts | 5 ++--- playwright-tests/tests/InsuranceLibertyMutual.ts | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/playwright-tests/framework/TestData.ts b/playwright-tests/framework/TestData.ts index 0fe04a1f9..8100fdf09 100644 --- a/playwright-tests/framework/TestData.ts +++ b/playwright-tests/framework/TestData.ts @@ -15,7 +15,7 @@ export interface ITestData extends base { isMSRZip?: boolean, isPIAEnabled?: boolean, isDualRecal?: boolean, - isPolicyInfoPage?: boolean, + isNewInsuranceFlow?: boolean, } diff --git a/playwright-tests/pages/PolicyInfoPage.ts b/playwright-tests/pages/PolicyInfoPage.ts index 7974e3099..04f35c346 100644 --- a/playwright-tests/pages/PolicyInfoPage.ts +++ b/playwright-tests/pages/PolicyInfoPage.ts @@ -1,6 +1,7 @@ import { expect, type Page } from '@playwright/test'; import { BasePage } from './BasePage'; import { step } from 'framework/localTypes/Step'; +import { TestSuccessAlert } from 'safelite-playwright-core'; import { ITestData } from 'framework/TestData'; export class PolicyInfoPage extends BasePage { @@ -14,5 +15,6 @@ export class PolicyInfoPage extends BasePage { async handlePolicyInfoPage(testData: Partial): Promise { await expect(this.page).toHaveURL(/\/fmg\/policy-info/); + throw new TestSuccessAlert('Policy info page validated successfully.'); } } diff --git a/playwright-tests/tests/0000__M.test.ts b/playwright-tests/tests/0000__M.test.ts index 58d5cc675..88e4101f5 100644 --- a/playwright-tests/tests/0000__M.test.ts +++ b/playwright-tests/tests/0000__M.test.ts @@ -324,7 +324,6 @@ async function runWorkflow(page: Page, testCase: TestCase) { // Insurance flow - if user selected Insurance as Payment Method if (paymentMethod == PaymentMethod.Insurance) { await handleInsuranceFlow(testCase); - if (testCase.testData.isPolicyInfoPage) return; // If Liberty Mutual and on PolicyInfoPage, skip the rest of the flow until the page is built out } //============================= SERVICE SCHEDULING ============================= @@ -365,7 +364,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { } async function handleInsuranceFlow(testCase: TestCase) { - const { isPolicyFound, isPolicyDriver, endorsements, isRecalVehicle, isCashInsuranceFlow, isForcedOEM, flow } = testCase.testData; + const { isPolicyFound, isPolicyDriver, endorsements, isRecalVehicle, isCashInsuranceFlow, isForcedOEM, flow, isNewInsuranceFlow } = testCase.testData; // Check if the insurance policy has endorsements const hasEndorsements = endorsements && endorsements.length > 0; @@ -382,7 +381,7 @@ async function handleInsuranceFlow(testCase: TestCase) { } // Liberty Mutual route directly to PolicyInfoPage instead of CCPolicyInfoPage - if (testCase.testData.isPolicyInfoPage) { + if (isNewInsuranceFlow) { let policyInfoPage = testCase.pages.policyInfoPage; await policyInfoPage.handlePolicyInfoPage(testCase.testData); return; diff --git a/playwright-tests/tests/InsuranceLibertyMutual.ts b/playwright-tests/tests/InsuranceLibertyMutual.ts index 0c89d6084..9edff185f 100644 --- a/playwright-tests/tests/InsuranceLibertyMutual.ts +++ b/playwright-tests/tests/InsuranceLibertyMutual.ts @@ -10,7 +10,7 @@ const insuranceLibertyMutualData: Partial = { ...getDefaultTestData(), paymentMethod: PaymentMethod.Insurance, - isPolicyInfoPage: true, + isNewInsuranceFlow: true, claimDetails: { client: 'Liberty Mutual Insurance',