89 lines
No EOL
3 KiB
TypeScript
89 lines
No EOL
3 KiB
TypeScript
//Imports here
|
|
import { ITestData, getDefaultExperimentsData } from 'framework/TestData'
|
|
import { ServiceLocation, DamageType, Flow} from 'safelite-playwright-core';
|
|
import { ITestCase } from '../framework/Typedefs'
|
|
import { PaymentMethod } from "framework/localTypes/Enums";
|
|
import { VehicleLookupType } from 'safelite-playwright-core';
|
|
import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core';
|
|
|
|
// Set the seed based on test name for consistent but unique data
|
|
setFakerSeedFromTestName("InsuranceUSAABigTruckVerified");
|
|
|
|
// Now get the test data with the seeded faker
|
|
const insuranceUSAABigTruckVerifiedData: Partial<ITestData> = {
|
|
...getDefaultTestData(), // Get default data with current seed
|
|
|
|
// Key feature: Insurance flow with GEICO
|
|
paymentMethod: PaymentMethod.Insurance,
|
|
|
|
// Insurance claim flags
|
|
isDuplicateClaim: true,
|
|
isPolicyFound: true,
|
|
flow: Flow.Managed,
|
|
isCanNotRecal: true,
|
|
isUseVehicleOnPolicy: true,
|
|
isHeavyTruck: true,
|
|
|
|
// Override customer details with specific name and California location
|
|
customerDetails: {
|
|
...getDefaultTestData().customerDetails!,
|
|
firstName: 'Big',
|
|
lastName: 'Truck',
|
|
address: {
|
|
...getDefaultTestData().customerDetails!.address,
|
|
city: 'Ontario',
|
|
state: 'California',
|
|
postalCode: '43085'
|
|
}
|
|
},
|
|
|
|
|
|
// Insurance claim details
|
|
claimDetails: {
|
|
client: 'USAA',
|
|
policyNumber: 'Mock900040BigTruck',
|
|
policyDeductible: 2000.00,
|
|
policyZip: '55414',
|
|
damageDate: new Date(new Date().setDate(new Date().getDate() - 1)).toLocaleDateString('en-US', {month: '2-digit', day: '2-digit', year: 'numeric'}),
|
|
damageCause: DamageType.Rock
|
|
},
|
|
|
|
// Hyundai vehicle details with VIN lookup
|
|
vehicleDetails: {
|
|
...getDefaultTestData().vehicleDetails!,
|
|
year: '2025',
|
|
make: 'Peterbilt',
|
|
model: '579',
|
|
style: 'conventional cab',
|
|
vin: '1XPBDP9X6SD693446',
|
|
vehicleLookupType: VehicleLookupType.Vin,
|
|
},
|
|
|
|
// No need to override vehicleDamage as it already defaults to WindshieldCrack
|
|
|
|
// Override for in-shop appointment
|
|
appointmentDetails: {
|
|
serviceLocation: ServiceLocation.InShop,
|
|
shopAddress: '3455 Centerpoint Dr, Urbancrest, OH 43123',
|
|
appointmentDate: getDefaultTestData().appointmentDetails?.appointmentDate
|
|
},
|
|
|
|
// Override payment details (empty because we skip payment method page in insurance flow)
|
|
paymentDetails: {},
|
|
|
|
// Experiments
|
|
experiments: {
|
|
...getDefaultExperimentsData()
|
|
}
|
|
}
|
|
|
|
const insuranceUSAABigTruckVerifiedTests: ITestCase[] = [];
|
|
|
|
const tc = {
|
|
name: `InsuranceUSAABigTruckVerified`,
|
|
tags: ['@E2E','@InsuranceBigTruckVerified', '@test_report', '@Insurance'],
|
|
testData: insuranceUSAABigTruckVerifiedData
|
|
};
|
|
insuranceUSAABigTruckVerifiedTests.push(tc);
|
|
|
|
export default insuranceUSAABigTruckVerifiedTests; |