From b947eb5c5f8ba98101b406adde69795abf08f86c Mon Sep 17 00:00:00 2001 From: kpatel8hs4io <31411746+kpatel8hs4io@users.noreply.github.com> Date: Fri, 10 Jul 2026 13:09:23 -0400 Subject: [PATCH] minor changes for playwright tests --- playwright-tests/pages/BailoutSuccessPage.ts | 2 +- playwright-tests/pages/PolicyInfoPage.ts | 2 +- playwright-tests/tests/0000__M.test.ts | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/playwright-tests/pages/BailoutSuccessPage.ts b/playwright-tests/pages/BailoutSuccessPage.ts index 603172bd3..c0ed1eb43 100644 --- a/playwright-tests/pages/BailoutSuccessPage.ts +++ b/playwright-tests/pages/BailoutSuccessPage.ts @@ -20,7 +20,7 @@ export class BailoutSuccessPage extends BasePage { await expect(this.thankYouHeading).toBeVisible(); await expect(this.bodyText).toBeVisible(); await expect(this.bodyText).toHaveText( - /We've got it from here! One of our experts will be in touch to schedule your appointment\. If you have any questions, please contact 1-888-238-4527/ + /We've got it from here! One of our experts will be in touch to schedule your appointment\. If you have any questions, please contact 888-308-4948./ ); await expect(this.returnToHomepageButton).toBeVisible(); } diff --git a/playwright-tests/pages/PolicyInfoPage.ts b/playwright-tests/pages/PolicyInfoPage.ts index 04f35c346..d65e0d7c1 100644 --- a/playwright-tests/pages/PolicyInfoPage.ts +++ b/playwright-tests/pages/PolicyInfoPage.ts @@ -12,7 +12,7 @@ export class PolicyInfoPage extends BasePage { } @step("PolicyInfoPage >> Continue") - async handlePolicyInfoPage(testData: Partial): Promise { + async handleNewPolicyInfoPage(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 88e4101f5..a0670130b 100644 --- a/playwright-tests/tests/0000__M.test.ts +++ b/playwright-tests/tests/0000__M.test.ts @@ -380,14 +380,12 @@ async function handleInsuranceFlow(testCase: TestCase) { await HeritageProblemGlassQuestionsPage.handleHeritageProblemGlassQuestionsPage(testCase.testData); } - // Liberty Mutual route directly to PolicyInfoPage instead of CCPolicyInfoPage if (isNewInsuranceFlow) { let policyInfoPage = testCase.pages.policyInfoPage; - await policyInfoPage.handlePolicyInfoPage(testCase.testData); - return; - } - - // Handle ccPolicyInfoPage + await policyInfoPage.handleNewPolicyInfoPage(testCase.testData); + } else { + + // Handle ccPolicyInfoPage let ccPolicyInfoPage = testCase.pages.ccPolicyInfoPage; await ccPolicyInfoPage.handleCCPolicyInfoPage(testCase.testData); @@ -431,6 +429,8 @@ 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) {