Rename for clarification
This commit is contained in:
parent
5090d2f231
commit
d9ef3f65b5
4 changed files with 10 additions and 11 deletions
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
@ -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()));
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue