diff --git a/playwright-tests/business-logic/types/ITestData.ts b/playwright-tests/business-logic/types/ITestData.ts index 72c6758fd..945196539 100644 --- a/playwright-tests/business-logic/types/ITestData.ts +++ b/playwright-tests/business-logic/types/ITestData.ts @@ -35,5 +35,5 @@ export interface ITestData { promoCode: string, policyZip: string, isPolicyUnverified: boolean - isCashToInsurance: boolean + isCashInsuranceFlow: boolean } \ No newline at end of file diff --git a/playwright-tests/pages/OrderConfirmationPage.ts b/playwright-tests/pages/OrderConfirmationPage.ts index 64348fea4..ce54d767c 100644 --- a/playwright-tests/pages/OrderConfirmationPage.ts +++ b/playwright-tests/pages/OrderConfirmationPage.ts @@ -43,7 +43,7 @@ export class OrderConfirmationPage extends BasePage { async validateOrderConfirmationPage(testData: Partial) { // Destructure data we use - const { vehicleDetails, customerDetails, servicePackage, promoCode, isCashToInsurance: isCashInsuranceFlow, + const { vehicleDetails, customerDetails, servicePackage, promoCode, isCashInsuranceFlow, isPolicyFound, claimDetails, paymentDetails, isUseVehicleOnPolicy, paymentMethod, isPolicyUnverified } = testData; await this.serviceText.waitFor({ state: "visible" }); diff --git a/playwright-tests/tests/0000__M.test.ts b/playwright-tests/tests/0000__M.test.ts index e62fdeeb4..419bd227a 100644 --- a/playwright-tests/tests/0000__M.test.ts +++ b/playwright-tests/tests/0000__M.test.ts @@ -302,7 +302,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { } export async function handleInsuranceFlow(testCase: TestCase) { - const { isPolicyFound, isPolicyDriver, endorsements, isRecalVehicle, isCashToInsurance: isCashInsuranceFlow } = testCase.testData; + const { isPolicyFound, isPolicyDriver, endorsements, isRecalVehicle, isCashInsuranceFlow } = testCase.testData; // Check if the insurance policy has endorsements const hasEndorsements = endorsements && endorsements.length > 0; @@ -356,6 +356,8 @@ export async function handleInsuranceFlow(testCase: TestCase) { let coverageStatementPage = testCase.pages.coverageStatementPage; await coverageStatementPage.handleCoverageStatementPage(testCase.testData); + // Handle scenario where user selected Cash to Insurance and needs to go back through the flow + // right now we are choosing pay at appointment as payment method for this scenario if (isCashInsuranceFlow) { let serviceLocationPage = testCase.pages.serviceLocationPage; await serviceLocationPage.nextPage(); diff --git a/playwright-tests/tests/CashReplaceSwitchToInsuranceProgressiveNoComp.ts b/playwright-tests/tests/CashReplaceSwitchToInsuranceProgressiveNoComp.ts index 542f7e601..702c09fce 100644 --- a/playwright-tests/tests/CashReplaceSwitchToInsuranceProgressiveNoComp.ts +++ b/playwright-tests/tests/CashReplaceSwitchToInsuranceProgressiveNoComp.ts @@ -11,7 +11,7 @@ setFakerSeedFromTestName("CashReplaceSwitchToInsuranceProgressiveNoComp"); const cashReplaceSwitchToInsuranceProgressiveNoCompData: Partial = { ...getDefaultTestData(), - isCashToInsurance: true, + isCashInsuranceFlow: true, // Override customer details based on provided ZIP code customerDetails: {