Renames isCashToInsurance to isCashInsuranceFlow
Updates the `isCashToInsurance` property to `isCashInsuranceFlow` for improved clarity and consistency in naming conventions. This change affects test data interfaces and related logic to accurately reflect the cash-to-insurance flow.
This commit is contained in:
parent
bb6f2b3cdc
commit
d7566e5d60
4 changed files with 6 additions and 4 deletions
|
|
@ -35,5 +35,5 @@ export interface ITestData {
|
||||||
promoCode: string,
|
promoCode: string,
|
||||||
policyZip: string,
|
policyZip: string,
|
||||||
isPolicyUnverified: boolean
|
isPolicyUnverified: boolean
|
||||||
isCashToInsurance: boolean
|
isCashInsuranceFlow: boolean
|
||||||
}
|
}
|
||||||
|
|
@ -43,7 +43,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, promoCode, isCashToInsurance: isCashInsuranceFlow,
|
const { vehicleDetails, customerDetails, servicePackage, promoCode, isCashInsuranceFlow,
|
||||||
isPolicyFound, claimDetails, paymentDetails, isUseVehicleOnPolicy, paymentMethod, isPolicyUnverified } = testData;
|
isPolicyFound, claimDetails, paymentDetails, isUseVehicleOnPolicy, paymentMethod, isPolicyUnverified } = testData;
|
||||||
await this.serviceText.waitFor({ state: "visible" });
|
await this.serviceText.waitFor({ state: "visible" });
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -302,7 +302,7 @@ async function runWorkflow(page: Page, testCase: TestCase) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function handleInsuranceFlow(testCase: TestCase) {
|
export async function handleInsuranceFlow(testCase: TestCase) {
|
||||||
const { isPolicyFound, isPolicyDriver, endorsements, isRecalVehicle, isCashToInsurance: isCashInsuranceFlow } = testCase.testData;
|
const { isPolicyFound, isPolicyDriver, endorsements, isRecalVehicle, isCashInsuranceFlow } = testCase.testData;
|
||||||
|
|
||||||
// Check if the insurance policy has endorsements
|
// Check if the insurance policy has endorsements
|
||||||
const hasEndorsements = endorsements && endorsements.length > 0;
|
const hasEndorsements = endorsements && endorsements.length > 0;
|
||||||
|
|
@ -356,6 +356,8 @@ export async function handleInsuranceFlow(testCase: TestCase) {
|
||||||
let coverageStatementPage = testCase.pages.coverageStatementPage;
|
let coverageStatementPage = testCase.pages.coverageStatementPage;
|
||||||
await coverageStatementPage.handleCoverageStatementPage(testCase.testData);
|
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) {
|
if (isCashInsuranceFlow) {
|
||||||
let serviceLocationPage = testCase.pages.serviceLocationPage;
|
let serviceLocationPage = testCase.pages.serviceLocationPage;
|
||||||
await serviceLocationPage.nextPage();
|
await serviceLocationPage.nextPage();
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ setFakerSeedFromTestName("CashReplaceSwitchToInsuranceProgressiveNoComp");
|
||||||
const cashReplaceSwitchToInsuranceProgressiveNoCompData: Partial<ITestData> = {
|
const cashReplaceSwitchToInsuranceProgressiveNoCompData: Partial<ITestData> = {
|
||||||
...getDefaultTestData(),
|
...getDefaultTestData(),
|
||||||
|
|
||||||
isCashToInsurance: true,
|
isCashInsuranceFlow: true,
|
||||||
|
|
||||||
// Override customer details based on provided ZIP code
|
// Override customer details based on provided ZIP code
|
||||||
customerDetails: {
|
customerDetails: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue