82 lines
No EOL
2.6 KiB
TypeScript
82 lines
No EOL
2.6 KiB
TypeScript
//Imports here
|
|
import { ITestData, getDefaultExperimentsData } from 'framework/TestData'
|
|
import { ServiceLocation, DamageType, Flow, PartQuestionType, LossLocation } from 'safelite-playwright-core';
|
|
import { PaymentMethod } from "framework/localTypes/Enums";
|
|
import { ITestCase } from '../framework/Typedefs'
|
|
import { VehicleLookupType } from 'safelite-playwright-core';
|
|
import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core';
|
|
|
|
// Seed for consistent test data generation
|
|
setFakerSeedFromTestName("InsuranceMeemicNearSchoolVerified");
|
|
|
|
// Now get the test data with the seeded faker
|
|
const insuranceMeemicNearSchoolVerifiedData: Partial<ITestData> = {
|
|
...getDefaultTestData(),
|
|
|
|
paymentMethod: PaymentMethod.Insurance,
|
|
|
|
isDuplicateClaim: false,
|
|
flow: Flow.Managed,
|
|
isPolicyFound: true,
|
|
isUseVehicleOnPolicy: true,
|
|
isRecalVehicle: false,
|
|
|
|
customerDetails: {
|
|
...getDefaultTestData().customerDetails!,
|
|
address: {
|
|
...getDefaultTestData().customerDetails!.address,
|
|
postalCode: '48382'
|
|
}
|
|
},
|
|
|
|
claimDetails: {
|
|
client: 'Meemic',
|
|
policyNumber: 'Mock427352LD',
|
|
policyDeductible: 0,
|
|
damageDate: new Date().toLocaleDateString('en-US', {month: '2-digit', day: '2-digit', year: 'numeric'}),
|
|
damageCause: DamageType.Rock,
|
|
lossLocation: LossLocation.School
|
|
},
|
|
|
|
vehicleDetails: {
|
|
...getDefaultTestData().vehicleDetails!,
|
|
year: '2015',
|
|
make: 'Jeep',
|
|
model: 'Wrangler',
|
|
style: '4 door utility',
|
|
vehicleLookupType: VehicleLookupType.Zip,
|
|
},
|
|
|
|
appointmentDetails: {
|
|
serviceLocation: ServiceLocation.InShop,
|
|
appointmentDate: getDefaultTestData().appointmentDetails?.appointmentDate,
|
|
shopAddress: "3451 Washtenaw Ave, Ann Arbor, MI 48104"
|
|
},
|
|
|
|
partQuestions: [
|
|
{
|
|
partQuestionType: PartQuestionType.GeneralQuestion1,
|
|
isOnPage: true,
|
|
optionToSelect: 'No'
|
|
},
|
|
],
|
|
|
|
// Override payment details (empty because we skip payment method page in insurance flow)
|
|
paymentDetails: {},
|
|
|
|
// Experiments
|
|
experiments: {
|
|
...getDefaultExperimentsData()
|
|
}
|
|
};
|
|
|
|
const insuranceMeemicNearSchoolVerifiedTests: ITestCase[] = [];
|
|
|
|
const tc = {
|
|
name: `InsuranceMeemicNearSchoolVerified`,
|
|
tags: ['@E2E', '@InsuranceMeemicNearSchool', '@test_report', '@Insurance'],
|
|
testData: insuranceMeemicNearSchoolVerifiedData
|
|
};
|
|
insuranceMeemicNearSchoolVerifiedTests.push(tc);
|
|
|
|
export default insuranceMeemicNearSchoolVerifiedTests; |