minor changes for playwright tests

This commit is contained in:
kpatel8hs4io 2026-07-10 13:09:23 -04:00
parent c288bf4e3b
commit b947eb5c5f
3 changed files with 8 additions and 8 deletions

View file

@ -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();
}

View file

@ -12,7 +12,7 @@ export class PolicyInfoPage extends BasePage {
}
@step("PolicyInfoPage >> Continue")
async handlePolicyInfoPage(testData: Partial<ITestData>): Promise<void> {
async handleNewPolicyInfoPage(testData: Partial<ITestData>): Promise<void> {
await expect(this.page).toHaveURL(/\/fmg\/policy-info/);
throw new TestSuccessAlert('Policy info page validated successfully.');

View file

@ -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) {