Rename test file to match scenario

This commit is contained in:
JennyNou 2026-04-08 19:43:48 -04:00
parent 45082aa2f2
commit 46e27bc106

View file

@ -1,23 +1,31 @@
import ClientData from "@business-logic/data/ClientData";
import TestCase from "@business-logic/types/TestCase";
import { DamageType, ServiceLocation, ServicePackage, VehicleDamage, VehicleLookupType } from "@business-logic/types/Enums";
import { DamageType, ServiceLocation, ServicePackage, VehicleDamage, VehicleLookupType, PartQuestionType } 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 essentialVehicleLookupBailoutData: Partial<ITestData> = {
const essentialPartQuestionsAndNotShareVinData: Partial<ITestData> = {
clientTag: 'ALL_ESSENTIAL',
isDuplicateClaim: false,
isPolicyFound: false,
endorsements: [],
isReplace: false,
partQuestions: undefined,
partQuestions: [
{
partQuestionType: PartQuestionType.GeneralQuestion1,
isOnPage: true,
optionToSelect: 'Yes'
},
{
partQuestionType: PartQuestionType.GeneralQuestion2,
isOnPage: true,
optionToSelect: 'Yes'
}
],
isSafelite: true,
bailoutFlags: {
isVehicleLookupBailout: true
},
servicePackage: faker.helpers.enumValue(ServicePackage),
customerDetails: {
firstName: faker.person.firstName(),
@ -43,19 +51,10 @@ const essentialVehicleLookupBailoutData: Partial<ITestData> = {
year: '2020',
make: 'BMW',
model: '740',
style: '4 door sedan' // TODO: Check correctness of vehicle style
style: '4 door sedan',
vehicleLookupType: VehicleLookupType.RatherNotShareVin,
},
vehicleDamage: [
// VehicleDamage.WindshieldThreeChips,
VehicleDamage.WindshieldCrack,
// VehicleDamage.DriverFrontDoor,
// VehicleDamage.DriverQuarterPanel,
// VehicleDamage.DriverRearDoor,
// VehicleDamage.PassengerFrontDoor,
// VehicleDamage.PassengerQuarterPanel,
// VehicleDamage.PassengerRearDoor,
// VehicleDamage.RearWindow
],
vehicleDamage: [VehicleDamage.WindshieldCrack],
appointmentDetails: {
serviceLocation: ServiceLocation.InShop,
shopAddress: '6826 Sawmill Rd, Columbus, OH 43235',
@ -65,17 +64,17 @@ const essentialVehicleLookupBailoutData: Partial<ITestData> = {
}
const essentialClients = ClientData.getEssentialClients();
const essentialVehicleLookupBailoutTests: TestCase[] = [];
const essentialPartQuestionsAndNotShareVinTests: TestCase[] = [];
for (const client of essentialClients) {
const data = {...essentialVehicleLookupBailoutData};
const data = {...essentialPartQuestionsAndNotShareVinData};
data.clientTag = client.clientTag;
data.isAuthenticationRequired = client.clientFlags.isAuthenticationEnabled ?? false
const tc = new TestCase({
name: `0020 Essential Vehicle Lookup Bailout Client: "${client.accountName}"`,
tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Bailout', '@VehicleLookup', '@Essentials'],
name: `0020 Essential Part Questions and Not Share Vin Client: "${client.accountName}"`,
tags: [`@${client.clientTag}`, `@${client.accountName}`, '@VehicleLookup', '@Essentials'],
testData: data
}, undefined, '0020');
essentialVehicleLookupBailoutTests.push(tc);
essentialPartQuestionsAndNotShareVinTests.push(tc);
}
export default essentialVehicleLookupBailoutTests;
export default essentialPartQuestionsAndNotShareVinTests;