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 { DuplicateCheckPage } from "../pages/DuplicateCheckPage"
|
||||||
import { PolicyVehiclesPage } from "../pages/PolicyVehiclesPage"
|
import { PolicyVehiclesPage } from "../pages/PolicyVehiclesPage"
|
||||||
import { PolicyInfoSubmittedPage } from "../pages/PolicyInfoSubmittedPage"
|
import { PolicyInfoSubmittedPage } from "../pages/PolicyInfoSubmittedPage"
|
||||||
import { ProblemGlassQuestionsPage } from "../pages/ProblemGlassQuestionsPage"
|
import { HeritageProblemGlassQuestionsPage } from "../pages/HeritageProblemGlassQuestionsPage"
|
||||||
import RecalibrationInfoPage from "../pages/RecalibrationInfoPage"
|
import RecalibrationInfoPage from "../pages/RecalibrationInfoPage"
|
||||||
import { CoverageStatementPage } from "../pages/CoverageStatementPage"
|
import { CoverageStatementPage } from "../pages/CoverageStatementPage"
|
||||||
import { VerifyDetailsPage } from "../pages/VerifyDetailsPage"
|
import { VerifyDetailsPage } from "../pages/VerifyDetailsPage"
|
||||||
|
|
@ -49,7 +49,7 @@ export interface ITestPages {
|
||||||
paymentMethodPage: PaymentMethodPage,
|
paymentMethodPage: PaymentMethodPage,
|
||||||
policyInfoSubmittedPage: PolicyInfoSubmittedPage,
|
policyInfoSubmittedPage: PolicyInfoSubmittedPage,
|
||||||
policyVehiclesPage: PolicyVehiclesPage,
|
policyVehiclesPage: PolicyVehiclesPage,
|
||||||
problemGlassQuestionsPage: ProblemGlassQuestionsPage,
|
heritageProblemGlassQuestionsPage: HeritageProblemGlassQuestionsPage,
|
||||||
recalibrationInfoPage: RecalibrationInfoPage,
|
recalibrationInfoPage: RecalibrationInfoPage,
|
||||||
schedulePage: SchedulePage,
|
schedulePage: SchedulePage,
|
||||||
mobileDetailsPage: MobileDetailsPage,
|
mobileDetailsPage: MobileDetailsPage,
|
||||||
|
|
@ -85,7 +85,7 @@ export const createTestPages: TestPagesFactory<ITestPages> = (page: Page) => {
|
||||||
paymentMethodPage: new PaymentMethodPage(page),
|
paymentMethodPage: new PaymentMethodPage(page),
|
||||||
policyInfoSubmittedPage: new PolicyInfoSubmittedPage(page),
|
policyInfoSubmittedPage: new PolicyInfoSubmittedPage(page),
|
||||||
policyVehiclesPage: new PolicyVehiclesPage(page),
|
policyVehiclesPage: new PolicyVehiclesPage(page),
|
||||||
problemGlassQuestionsPage: new ProblemGlassQuestionsPage(page),
|
heritageProblemGlassQuestionsPage: new HeritageProblemGlassQuestionsPage(page),
|
||||||
recalibrationInfoPage: new RecalibrationInfoPage(page),
|
recalibrationInfoPage: new RecalibrationInfoPage(page),
|
||||||
schedulePage: new SchedulePage(page),
|
schedulePage: new SchedulePage(page),
|
||||||
mobileDetailsPage: new MobileDetailsPage(page),
|
mobileDetailsPage: new MobileDetailsPage(page),
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
import { expect, type Locator, type Page } from '@playwright/test';
|
import { expect, type Locator, type Page } from '@playwright/test';
|
||||||
import { IClaimDetails, ICustomerDetails } from 'safelite-playwright-core';
|
|
||||||
import { InsuranceBasePage } from './InsuranceBasePage';
|
import { InsuranceBasePage } from './InsuranceBasePage';
|
||||||
import { ITestData } from 'framework/TestData';
|
import { ITestData } from 'framework/TestData';
|
||||||
import { step } from 'framework/localTypes/Step';
|
import { step } from 'framework/localTypes/Step';
|
||||||
|
|
||||||
export class ProblemGlassQuestionsPage extends InsuranceBasePage {
|
export class HeritageProblemGlassQuestionsPage extends InsuranceBasePage {
|
||||||
readonly provideVinManuallyButton: Locator;
|
readonly provideVinManuallyButton: Locator;
|
||||||
readonly provideLicensePlateButton: Locator;
|
readonly provideLicensePlateButton: Locator;
|
||||||
readonly provideHomeAddressButton: Locator;
|
readonly provideHomeAddressButton: Locator;
|
||||||
|
|
@ -32,9 +31,9 @@ export class ProblemGlassQuestionsPage extends InsuranceBasePage {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@step("ProblemGlassQuestionsPage >> Handle VIN popup and answer glass question")
|
@step("HeritageProblemGlassQuestionsPage >> Handle VIN popup and answer glass question on heritage")
|
||||||
|
// Handles OEM scenario with vehicle that has only one glass question
|
||||||
async handleproblemGlassQuestionsPage(testData: Partial<ITestData>){
|
async handleHeritageProblemGlassQuestionsPage(testData: Partial<ITestData>){
|
||||||
|
|
||||||
await this.dontShareVinButton.click();
|
await this.dontShareVinButton.click();
|
||||||
await this.yestoGlassQuestionButton.click();
|
await this.yestoGlassQuestionButton.click();
|
||||||
|
|
@ -47,7 +47,7 @@ export class OrderConfirmationPage extends BasePage {
|
||||||
async validateOrderConfirmationPage(testData: Partial<ITestData>) {
|
async validateOrderConfirmationPage(testData: Partial<ITestData>) {
|
||||||
// Destructure data we use
|
// Destructure data we use
|
||||||
const { vehicleDetails, customerDetails, servicePackage, isCashInsuranceFlow,
|
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" });
|
await this.serviceText.waitFor({ state: "visible" });
|
||||||
|
|
||||||
Soft.expect((await this.getActualAppointmentSummary()).map(item => item.toLowerCase())).toEqual((await this.getExpectedAppointmentSummary(testData)).map(item => item.toLowerCase()));
|
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) {
|
if (isOEM) {
|
||||||
// User should be on heritage problem glass questions page after selecting Allstate on insurance company page
|
// User should be on heritage problem glass questions page after selecting Allstate on insurance company page
|
||||||
if (testCase.testData.isOEM === true) {
|
if (testCase.testData.isOEM === true) {
|
||||||
let problemGlassQuestionsPage = testCase.pages.problemGlassQuestionsPage;
|
let HeritageProblemGlassQuestionsPage = testCase.pages.heritageProblemGlassQuestionsPage;
|
||||||
await problemGlassQuestionsPage.handleproblemGlassQuestionsPage(testCase.testData);
|
await HeritageProblemGlassQuestionsPage.handleHeritageProblemGlassQuestionsPage(testCase.testData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue