import ClientData from "@business-logic/data/ClientData"; import TestCase from "@business-logic/types/TestCase"; import { DamageType, PartQuestionType, ServiceLocation, ServicePackage, VehicleDamage, VehicleLookupType } from "@business-logic/types/Enums"; import { ITestData } from "@business-logic/types/ITestData" import { faker } from "@faker-js/faker"; import { getNextWeekday } from "@impl/utils/DateUtils"; const nextWeekday = getNextWeekday(); const essentialUnqiqueGlassData: Partial = { clientTag: 'ALL_ESSENTIAL', isDuplicateClaim: false, isPolicyFound: false, endorsements: [], isReplace: false, isSafelite: true, servicePackage: ServicePackage.GlassOnly, customerDetails: { firstName: faker.person.firstName(), lastName: faker.person.lastName(), email: "itqatest@safelite.com", phoneNumber: faker.helpers.fromRegExp(/[2-9][0-9][0-9]-[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]/), notes: 'Automated Test', address: { street: '3202 S Mason Ave', city: 'Tacoma', state: 'WASHINGTON', postalCode: '98409', country: 'United States' } }, claimDetails: { policyNumber: faker.string.alphanumeric(5), policyDeductible: -1, // Not advanced, so we don't care about deductible. damageDate: '2024-10-10', damageCause: DamageType.Other }, vehicleDetails: { year: '2019', make: 'Ram', model: 'Promaster', style: 'cargo van', vin: '3C6TRVBG8KE566001', vehicleLookupType: VehicleLookupType.Vin }, vehicleDamage: [ VehicleDamage.WindshieldCrack, VehicleDamage.DriverSlidingDoor ], vehiclePartQuestions: [ { partQuestionType: PartQuestionType.WindshieldColor, isOnPage: true, optionToSelect: 'Third Visor Frit' }, { partQuestionType: PartQuestionType.DriverSideColor, isOnPage: true, optionToSelect: 'Solar, Driver side, Rear, Movable, Exc. 118" Wb, Aftermarket' }, ], appointmentDetails: { serviceLocation: ServiceLocation.DropOff, appointmentDate: nextWeekday } } const essentialClients = ClientData.getEssentialClients(); const essentialUniqueGlassTests: TestCase[] = []; for (const client of essentialClients) { const data = {...essentialUnqiqueGlassData}; data.clientTag = client.clientTag; data.isAuthenticationRequired = client.clientFlags.isAuthenticationEnabled ?? false const tc = new TestCase({ name: `0012 Essential Unique Glass Client: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`,'@Essentials'], testData: data }, undefined, '0012'); essentialUniqueGlassTests.push(tc); } export default essentialUniqueGlassTests;