Updates the `isRecalNotification` flag to `isRecalVehicle` for better clarity and consistency across the codebase. This change ensures that the flag's name accurately reflects its purpose: to indicate whether recalibration information for a vehicle is required.
82 lines
No EOL
3 KiB
TypeScript
82 lines
No EOL
3 KiB
TypeScript
//Imports here
|
|
import { ITestData } from "@business-logic/types/ITestData"
|
|
import { PaymentMethod, AppointmentType, DamageType, PartQuestionType, PaymentType } from "@business-logic/types/Enums";
|
|
import TestCase from "@business-logic/types/TestCase";
|
|
import { VehicleLookupType } from "@business-logic/types/Enums";
|
|
import { getDefaultTestData, setFakerSeedFromTestName } from "@business-logic/constants/DefaultTestData";
|
|
|
|
// Set the seed based on test name for consistent but unique data
|
|
setFakerSeedFromTestName("InsuranceITAC21stCentury");
|
|
|
|
// Now get the test data with the seeded faker
|
|
const insuranceITAC21stCenturyData: Partial<ITestData> = {
|
|
...getDefaultTestData(), // Get default data with current seed
|
|
|
|
// Key feature: Insurance flow with 21st Century - ITAC (Insurance Total Assumption of Coverage)
|
|
paymentMethod: PaymentMethod.Insurance,
|
|
|
|
// Insurance claim flags
|
|
isDuplicateClaim: true,
|
|
isPolicyFound: true,
|
|
isUseVehicleOnPolicy: true,
|
|
isRecalVehicle: true, // Special flag for recalibration notification
|
|
|
|
// Override customer details for California location
|
|
customerDetails: {
|
|
...getDefaultTestData().customerDetails!,
|
|
address: {
|
|
...getDefaultTestData().customerDetails!.address,
|
|
city: 'Ontario',
|
|
state: 'California',
|
|
postalCode: '91761'
|
|
}
|
|
},
|
|
|
|
// Insurance claim details with high deductible
|
|
claimDetails: {
|
|
client: '21st Century',
|
|
policyNumber: 'Mock200122P',
|
|
policyDeductible: 3500, // High deductible test case
|
|
damageDate: new Date(new Date().setDate(new Date().getDate() - 1)).toLocaleDateString('en-US', {month: '2-digit', day: '2-digit', year: 'numeric'}),
|
|
damageCause: DamageType.Hail
|
|
},
|
|
|
|
// Vehicle details using ZIP lookup
|
|
vehicleDetails: {
|
|
...getDefaultTestData().vehicleDetails!,
|
|
year: '2018',
|
|
make: 'Honda',
|
|
model: 'Accord',
|
|
style: '4 door sedan',
|
|
vehicleLookupType: VehicleLookupType.Zip,
|
|
},
|
|
|
|
// No need to override vehicleDamage as it already defaults to WindshieldCrack
|
|
|
|
// Override for in-shop appointment with specific shop
|
|
appointmentDetails: {
|
|
serviceLocation: AppointmentType.InShop,
|
|
appointmentDate: getDefaultTestData().appointmentDetails?.appointmentDate,
|
|
shopAddress: "8160 Masi Dr, Rancho Cucamonga, CA 91730"
|
|
},
|
|
|
|
// Part questions related to recalibration
|
|
partQuestions: [
|
|
{
|
|
partQuestionType: PartQuestionType.GeneralQuestion1,
|
|
isOnPage: true,
|
|
optionToSelect: 'Yes'
|
|
},
|
|
]
|
|
}
|
|
|
|
const insuranceITAC21stCenturyTests: TestCase[] = [];
|
|
|
|
const tc = new TestCase({
|
|
name: `InsuranceITAC21stCentury`,
|
|
tags: ['@E2E','@InsuranceITAC21stCentury', '@test_report', '@Insurance'],
|
|
testData: insuranceITAC21stCenturyData
|
|
}, undefined, 'InsuranceITAC21stCentury');
|
|
insuranceITAC21stCenturyTests.push(tc);
|
|
|
|
export default insuranceITAC21stCenturyTests; |