From 375c6a291c401b9fdea797e737ef6073be69f192 Mon Sep 17 00:00:00 2001 From: JennyNou Date: Fri, 8 May 2026 09:43:02 -0400 Subject: [PATCH 1/4] Add progress bar validation for insurance details page --- playwright-tests/framework/localTypes/Enums.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/playwright-tests/framework/localTypes/Enums.ts b/playwright-tests/framework/localTypes/Enums.ts index d112f9110..3e69f19e7 100644 --- a/playwright-tests/framework/localTypes/Enums.ts +++ b/playwright-tests/framework/localTypes/Enums.ts @@ -18,6 +18,7 @@ export enum ProgressBarPercentages { VehiclePartsPage = '20%', ServicePackagePage = '60%', InsuranceCompanyPage = '60%', + InsuranceDetailsPage = '55%', ServiceLocationPage = '76%', SchedulePage = '76%', MobileDetailsPage = '76%', From 24fded45c922e5382c5ff411d729fecb5c4a440d Mon Sep 17 00:00:00 2001 From: JennyNou Date: Fri, 8 May 2026 10:54:06 -0400 Subject: [PATCH 2/4] Add insurance details page --- playwright-tests/framework/TestPages.ts | 3 + .../pages/InsuranceDetailsPage.ts | 61 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 playwright-tests/pages/InsuranceDetailsPage.ts diff --git a/playwright-tests/framework/TestPages.ts b/playwright-tests/framework/TestPages.ts index c2cc04b35..bc98e44b5 100644 --- a/playwright-tests/framework/TestPages.ts +++ b/playwright-tests/framework/TestPages.ts @@ -20,6 +20,7 @@ import VehiclePartQuestionsPage from "../pages/VehiclePartsPage" import CapabilityQuestionsPage from "../pages/CapabilityQuestionsPage" import MoldingQuestionsPage from "../pages/MoldingQuestionsPage" import { InsuranceCompanyPage } from "../pages/InsuranceCompanyPage" +import { InsuranceDetailsPage } from "../pages/InsuranceDetailsPage" import { CCPolicyInfoPage } from "../pages/CCPolicyInfoPage" import { DuplicateCheckPage } from "../pages/DuplicateCheckPage" import { PolicyVehiclesPage } from "../pages/PolicyVehiclesPage" @@ -42,6 +43,7 @@ export interface ITestPages { estimatePage: EstimatePage, homePage: HomePage, insuranceCompanyPage: InsuranceCompanyPage, + insuranceDetailsPage: InsuranceDetailsPage, leadgenHomePage: LeadgenHomePage, moldingQuestionsPage: MoldingQuestionsPage, orderConfirmationPage: OrderConfirmationPage, @@ -78,6 +80,7 @@ export const createTestPages: TestPagesFactory = (page: Page) => { estimatePage: new EstimatePage(page), homePage: new HomePage(page), insuranceCompanyPage: new InsuranceCompanyPage(page), + insuranceDetailsPage: new InsuranceDetailsPage(page), leadgenHomePage: new LeadgenHomePage(page), moldingQuestionsPage: new MoldingQuestionsPage(page), orderConfirmationPage: new OrderConfirmationPage(page), diff --git a/playwright-tests/pages/InsuranceDetailsPage.ts b/playwright-tests/pages/InsuranceDetailsPage.ts new file mode 100644 index 000000000..4b00e98a3 --- /dev/null +++ b/playwright-tests/pages/InsuranceDetailsPage.ts @@ -0,0 +1,61 @@ +import { type Locator, type Page } from '@playwright/test'; +import { BasePage } from './BasePage'; +import { step } from 'framework/localTypes/Step'; +import { ITestData } from 'framework/TestData'; +import { ProgressBarPercentages } from 'framework/localTypes/Enums'; + +export class InsuranceDetailsPage extends BasePage { + + readonly page: Page; + readonly insuranceCompany: Locator; + readonly policyNumber: Locator; + readonly dateOfLoss: Locator; + readonly damageCause: Locator; + readonly claimNumber: Locator; // conditional — only shown for certain insurers like Kentucky Farm Bureau + readonly streetAddress: Locator; + readonly apartment: Locator; + readonly city: Locator; + readonly policyState: Locator; + readonly policyZip: Locator; + + constructor(page: Page) { + super(page); + this.page = page; + + this.insuranceCompany = page.getByLabel('Insurance company'); + this.policyNumber = page.getByLabel('Policy number'); + this.dateOfLoss = page.getByLabel('Approximate date of loss'); + this.claimNumber = page.getByLabel('Claim Number'); + this.damageCause = page.getByLabel('How did the damage occur?'); + this.streetAddress = page.getByLabel('Street address'); + this.apartment = page.getByLabel('Apt. number (optional)'); + this.city = page.getByLabel('City'); + this.policyState = page.getByLabel('State'); + this.policyZip = page.getByLabel('Zip'); + } + + private async populatePage(testData: Partial): Promise { + const { claimDetails, customerDetails } = testData; + + await this.policyNumber.fill(claimDetails!.policyNumber); + await this.dateOfLoss.fill(claimDetails!.damageDate); + await this.damageCause.selectOption(claimDetails!.damageCause); + await this.streetAddress.fill(customerDetails!.address.street); + await this.apartment.fill(customerDetails!.address.aptNumber ?? ''); + await this.city.fill(customerDetails!.address.city); + await this.policyState.selectOption(customerDetails!.address.state); + await this.policyZip.fill(customerDetails!.address.postalCode); + + if (await this.claimNumber.isVisible()) { + await this.claimNumber.fill(claimDetails!.claimNumber ?? ''); + } + } + + @step("InsuranceDetailsPage >> Fill out insurance details for non integrated insurance flow") + async handleInsuranceDetailsPage(testData: Partial): Promise { + await this.validateProgressBar(ProgressBarPercentages.InsuranceDetailsPage); + await this.populatePage(testData); + await this.nextPage(); + } + +} \ No newline at end of file From 0086b1c1fee0dda55ff8e5e7630c36c162079819 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Fri, 8 May 2026 15:29:15 -0400 Subject: [PATCH 3/4] CASH-2570 unverified message incorrectly showing CASH-2570 the unverified message shows if you go through initially unverified and get assigned the experiment and create a new order as cash. You're still assigned the unverified deductible experiment. So qualified the alert message to include a check for isInsurance. Also noticed in vuex, when switching from insurance to cash, the insurance properties in vuex are still set. Added code to clear them when selecting a cash order --- src/constants/store-actions.js | 1 + src/constants/store-mutations.js | 1 + src/layouts/payment-method/payment-method.vue | 5 ++-- src/layouts/quote/quote.vue | 1 + src/store/index.js | 23 +++++++++++++++++++ 5 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/constants/store-actions.js b/src/constants/store-actions.js index 702f7c737..ad31474c3 100644 --- a/src/constants/store-actions.js +++ b/src/constants/store-actions.js @@ -123,6 +123,7 @@ const storeActions = { CREATE_SUBMITTED_STATE: "createSubmittedState", RESET_SUBMITTED_STATE: "resetSubmittedState", + RESET_INSURANCE_DETAILS: "resetInsuranceDetails", ADD_DONATION_TO_SUBMITTED_STATE: "addDonationToSubmittedState", RESET_EXTERNAL_PARAMETER_STATE: "resetExternalParameterState", UPDATE_EXTERNAL_PARAMETER_MMS: "updateExternalParameterMMS", diff --git a/src/constants/store-mutations.js b/src/constants/store-mutations.js index c43e737d3..e8bde83a5 100644 --- a/src/constants/store-mutations.js +++ b/src/constants/store-mutations.js @@ -100,6 +100,7 @@ const storeMutations = { RESET_SERVICE_LOCATION_MOBILE_ADDRESS: "resetServiceLocationMobileAddress", RESET_SCHEDULE: "resetSchedule", RESET_PAYMENT_METHOD_CHOICE: "resetPaymentMethodChoice", + RESET_INSURANCE_DETAILS: "resetInsuranceDetails", // OTHER MUTATIONS UPDATE_PAGE_DATA: "updatePageData", diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index da49aa039..b0347f581 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -834,11 +834,12 @@ export default { return getBoolFromString(this.$route?.query?.piaError); }, shouldDisplayUnverifiedInsuranceAlert() { - const shouldDisplayUnverifiedDeduct = experimentMixin.methods.hasSettingEqualTo( + const hasExperimentSetting = experimentMixin.methods.hasSettingEqualTo( experimentSettings.SHOW_UNVERIFIED_DEDUCT_ENTRY, "true" ); - return shouldDisplayUnverifiedDeduct; + + return hasExperimentSetting && this.isInsurance; }, // Necessary to make the watcher of lineItems work // JavaScript does not keep a record of the old value, only a reference to it's location in the memory. diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index d9f238733..206ff2050 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -799,6 +799,7 @@ export default { false, false ); + this.dispatchStoreAction(this.storeActions.RESET_INSURANCE_DETAILS, false, false); this.dispatchStoreAction(this.storeActions.SAVE_CAN_SCHEDULE_ONLINE, false, false); this.dispatchStoreAction(this.storeActions.SAVE_ACCOUNT_NAME, null, false); } else { diff --git a/src/store/index.js b/src/store/index.js index 4f729efa3..18b34f023 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -374,6 +374,26 @@ export const mutations = { updateIsInsurance(state, isInsurance) { state.order.payment.isInsurance = isInsurance; }, + resetInsuranceDetails(state) { + state.order.payment.insuranceCoverage = { + isVerified: null, + coverageStatus: null, + coverageSubStatus: null, + coverageType: null, + coverageVerificationType: null, + }; + + state.order.policy.policyNumber = null; + state.order.policy.claimNumber = null; + state.order.policy.insuranceCompanyName = null; + state.order.policy.streetAddress = null; + state.order.policy.apartment = null; + state.order.policy.city = null; + state.order.policy.state = null; + state.order.policy.zipCode = null; + state.order.damage.dateOfLoss = null; + state.order.damage.damageCause = null; + }, updateIsPia(state, isPia) { state.order.payment.isPia = isPia; }, @@ -3116,6 +3136,9 @@ export const actions = { saveBillToAccountNumber(context, billToAccountNumber) { context.commit(storeMutations.UPDATE_BILL_TO_ACCT_NUMBER, billToAccountNumber); }, + resetInsuranceDetails(context) { + context.commit(storeMutations.RESET_INSURANCE_DETAILS); + }, saveSupportingItems(context, supportingItems) { syncLineItemIds(supportingItems, context.state.order.lineItems.supportingItems); From f425ff3fc8fd203fe19c6c2f921ecc9bd5abed98 Mon Sep 17 00:00:00 2001 From: credelinghuys Date: Mon, 11 May 2026 09:43:07 -0400 Subject: [PATCH 4/4] CASH-2654: Set IsInsurable on mobile fee --- src/layouts/schedule/schedule.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index 6f2db110b..788b7c388 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -1234,6 +1234,7 @@ export default { supportingItems[mobileFeeIndex].laborAmount = this.mobileFeePart.laborAmount; supportingItems[mobileFeeIndex].sellingPrice = this.mobileFeePart.sellingPrice; supportingItems[mobileFeeIndex].kitPrice = this.mobileFeePart.kitPrice; + supportingItems[mobileFeeIndex].isInsurable = this.mobileFeePart.isInsurable; } else { if (this.mobileFeePart !== null) supportingItems.push(this.mobileFeePart); }