Rename for clarification

This commit is contained in:
JennyNou 2025-11-17 16:18:00 -05:00
parent 5090d2f231
commit d9ef3f65b5
4 changed files with 10 additions and 11 deletions

View file

@ -24,7 +24,7 @@ import { CCPolicyInfoPage } from "../pages/CCPolicyInfoPage"
import { DuplicateCheckPage } from "../pages/DuplicateCheckPage"
import { PolicyVehiclesPage } from "../pages/PolicyVehiclesPage"
import { PolicyInfoSubmittedPage } from "../pages/PolicyInfoSubmittedPage"
import { ProblemGlassQuestionsPage } from "../pages/ProblemGlassQuestionsPage"
import { HeritageProblemGlassQuestionsPage } from "../pages/HeritageProblemGlassQuestionsPage"
import RecalibrationInfoPage from "../pages/RecalibrationInfoPage"
import { CoverageStatementPage } from "../pages/CoverageStatementPage"
import { VerifyDetailsPage } from "../pages/VerifyDetailsPage"
@ -49,7 +49,7 @@ export interface ITestPages {
paymentMethodPage: PaymentMethodPage,
policyInfoSubmittedPage: PolicyInfoSubmittedPage,
policyVehiclesPage: PolicyVehiclesPage,
problemGlassQuestionsPage: ProblemGlassQuestionsPage,
heritageProblemGlassQuestionsPage: HeritageProblemGlassQuestionsPage,
recalibrationInfoPage: RecalibrationInfoPage,
schedulePage: SchedulePage,
mobileDetailsPage: MobileDetailsPage,
@ -85,7 +85,7 @@ export const createTestPages: TestPagesFactory<ITestPages> = (page: Page) => {
paymentMethodPage: new PaymentMethodPage(page),
policyInfoSubmittedPage: new PolicyInfoSubmittedPage(page),
policyVehiclesPage: new PolicyVehiclesPage(page),
problemGlassQuestionsPage: new ProblemGlassQuestionsPage(page),
heritageProblemGlassQuestionsPage: new HeritageProblemGlassQuestionsPage(page),
recalibrationInfoPage: new RecalibrationInfoPage(page),
schedulePage: new SchedulePage(page),
mobileDetailsPage: new MobileDetailsPage(page),

View file

@ -1,10 +1,9 @@
import { expect, type Locator, type Page } from '@playwright/test';
import { IClaimDetails, ICustomerDetails } from 'safelite-playwright-core';
import { InsuranceBasePage } from './InsuranceBasePage';
import { ITestData } from 'framework/TestData';
import { step } from 'framework/localTypes/Step';
export class ProblemGlassQuestionsPage extends InsuranceBasePage {
export class HeritageProblemGlassQuestionsPage extends InsuranceBasePage {
readonly provideVinManuallyButton: Locator;
readonly provideLicensePlateButton: Locator;
readonly provideHomeAddressButton: Locator;
@ -32,9 +31,9 @@ export class ProblemGlassQuestionsPage extends InsuranceBasePage {
}
@step("ProblemGlassQuestionsPage >> Handle VIN popup and answer glass question")
async handleproblemGlassQuestionsPage(testData: Partial<ITestData>){
@step("HeritageProblemGlassQuestionsPage >> Handle VIN popup and answer glass question on heritage")
// Handles OEM scenario with vehicle that has only one glass question
async handleHeritageProblemGlassQuestionsPage(testData: Partial<ITestData>){
await this.dontShareVinButton.click();
await this.yestoGlassQuestionButton.click();

View file

@ -47,7 +47,7 @@ export class OrderConfirmationPage extends BasePage {
async validateOrderConfirmationPage(testData: Partial<ITestData>) {
// Destructure data we use
const { vehicleDetails, customerDetails, servicePackage, isCashInsuranceFlow,
isPolicyFound, claimDetails, paymentDetails, isUseVehicleOnPolicy, paymentMethod, isPolicyUnverified, isOEM } = testData;
isPolicyFound, claimDetails, paymentDetails, isUseVehicleOnPolicy, paymentMethod, isPolicyUnverified} = testData;
await this.serviceText.waitFor({ state: "visible" });
Soft.expect((await this.getActualAppointmentSummary()).map(item => item.toLowerCase())).toEqual((await this.getExpectedAppointmentSummary(testData)).map(item => item.toLowerCase()));

View file

@ -338,8 +338,8 @@ export async function handleInsuranceFlow(testCase: TestCase) {
if (isOEM) {
// User should be on heritage problem glass questions page after selecting Allstate on insurance company page
if (testCase.testData.isOEM === true) {
let problemGlassQuestionsPage = testCase.pages.problemGlassQuestionsPage;
await problemGlassQuestionsPage.handleproblemGlassQuestionsPage(testCase.testData);
let HeritageProblemGlassQuestionsPage = testCase.pages.heritageProblemGlassQuestionsPage;
await HeritageProblemGlassQuestionsPage.handleHeritageProblemGlassQuestionsPage(testCase.testData);
}
}