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,
|
||||
policyZip: string,
|
||||
isPolicyUnverified: boolean
|
||||
isCashToInsurance: boolean
|
||||
isCashInsuranceFlow: boolean
|
||||
}
|
||||
|
|
@ -43,7 +43,7 @@ export class OrderConfirmationPage extends BasePage {
|
|||
|
||||
async validateOrderConfirmationPage(testData: Partial<ITestData>) {
|
||||
// Destructure data we use
|
||||
const { vehicleDetails, customerDetails, servicePackage, promoCode, isCashToInsurance: isCashInsuranceFlow,
|
||||
const { vehicleDetails, customerDetails, servicePackage, promoCode, isCashInsuranceFlow,
|
||||
isPolicyFound, claimDetails, paymentDetails, isUseVehicleOnPolicy, paymentMethod, isPolicyUnverified } = testData;
|
||||
await this.serviceText.waitFor({ state: "visible" });
|
||||
|
||||
|
|
|
|||
|
|
@ -302,7 +302,7 @@ async function runWorkflow(page: Page, 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
|
||||
const hasEndorsements = endorsements && endorsements.length > 0;
|
||||
|
|
@ -356,6 +356,8 @@ export 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) {
|
||||
let serviceLocationPage = testCase.pages.serviceLocationPage;
|
||||
await serviceLocationPage.nextPage();
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ setFakerSeedFromTestName("CashReplaceSwitchToInsuranceProgressiveNoComp");
|
|||
const cashReplaceSwitchToInsuranceProgressiveNoCompData: Partial<ITestData> = {
|
||||
...getDefaultTestData(),
|
||||
|
||||
isCashToInsurance: true,
|
||||
isCashInsuranceFlow: true,
|
||||
|
||||
// Override customer details based on provided ZIP code
|
||||
customerDetails: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue