Add part question responses to test case data

This commit is contained in:
JennyNou 2026-03-25 09:51:45 -04:00
parent c430ee82ef
commit 82602ea348
3 changed files with 16 additions and 16 deletions

View file

@ -25,7 +25,7 @@ const customerDetails: ICustomerDetails = {
address: customerAddress address: customerAddress
} }
const policyNumber = `~AutomatedScenario0003a${faker.string.uuid().substring(0,6)}`; const policyNumber = `~AutomatedScenario0003a${crypto.randomUUID().replace(/-/g, '').slice(0, 16).toUpperCase()}`;
const policySoap = MockPolicyData.getPolicySoapByScenario('0003a', customerDetails, policyNumber); const policySoap = MockPolicyData.getPolicySoapByScenario('0003a', customerDetails, policyNumber);
const advancedScenario0003Data: Partial<ITestData> = { const advancedScenario0003Data: Partial<ITestData> = {
@ -33,6 +33,7 @@ const advancedScenario0003Data: Partial<ITestData> = {
isDuplicateClaim: false, isDuplicateClaim: false,
isPolicyFound: true, isPolicyFound: true,
isNoComp: false, isNoComp: false,
hasOemEndorsement: true,
hasStateLawPopup: false, hasStateLawPopup: false,
endorsements: undefined, endorsements: undefined,
vehiclePartQuestions: [ vehiclePartQuestions: [
@ -44,7 +45,7 @@ const advancedScenario0003Data: Partial<ITestData> = {
{ {
partQuestionType: PartQuestionType.PassengerRearColor, partQuestionType: PartQuestionType.PassengerRearColor,
isOnPage: true, isOnPage: true,
optionToSelect: 'Green Tint' optionToSelect: 'Solar, Passenger side, Rear'
}, },
], ],
isSafelite: true, isSafelite: true,
@ -53,7 +54,7 @@ const advancedScenario0003Data: Partial<ITestData> = {
claimDetails: { claimDetails: {
policyNumber: policyNumber, policyNumber: policyNumber,
policyDeductible: 50, policyDeductible: 50,
damageDate: '2016-01-02', damageDate: '2026-01-02',
damageCause: faker.helpers.enumValue(DamageType) damageCause: faker.helpers.enumValue(DamageType)
}, },
policySoap: policySoap, policySoap: policySoap,

View file

@ -25,7 +25,7 @@ const customerDetails: ICustomerDetails = {
address: customerAddress address: customerAddress
} }
const policyNumber = `~AutomatedScenario0015a${faker.string.uuid().substring(0,6)}`; const policyNumber = `~AutomatedScenario0015a${crypto.randomUUID().replace(/-/g, '').slice(0, 16).toUpperCase()}`; // Ensure unique policy number for each test run since same key in request can cause 500 error
const policySoap = MockPolicyData.getPolicySoapByScenario('0015a', customerDetails, policyNumber); const policySoap = MockPolicyData.getPolicySoapByScenario('0015a', customerDetails, policyNumber);
const advancedScenario0015Data: Partial<ITestData> = { const advancedScenario0015Data: Partial<ITestData> = {
@ -46,16 +46,16 @@ const advancedScenario0015Data: Partial<ITestData> = {
{ {
partQuestionType: PartQuestionType.WindshieldColor, partQuestionType: PartQuestionType.WindshieldColor,
isOnPage: true, isOnPage: true,
optionToSelect: 'Green Tint, Blue Shade' optionToSelect: 'Heated glass, Heated glass Wiper Park'
}, },
{ {
partQuestionType: PartQuestionType.DriverFrontColor, partQuestionType: PartQuestionType.DriverFrontColor,
isOnPage: true, isOnPage: true,
optionToSelect: 'Green Tint' optionToSelect: 'Driver side, Front'
} }
], ],
isSafelite: true, isSafelite: true,
servicePackage: faker.helpers.enumValue(ServicePackage), servicePackage: ServicePackage.Premium,
customerDetails: customerDetails, customerDetails: customerDetails,
claimDetails: { claimDetails: {
policyNumber: policyNumber, policyNumber: policyNumber,

View file

@ -25,7 +25,7 @@ const customerDetails: ICustomerDetails = {
address: customerAddress address: customerAddress
} }
const policyNumber = `~AutomatedScenario0016a${faker.string.uuid().substring(0,6)}`; const policyNumber = `~AutomatedScenario0016a${crypto.randomUUID().replace(/-/g, '').slice(0, 16).toUpperCase()}`; // Ensure unique policy number for each test run since same key in request can cause 500 error
const policySoap = MockPolicyData.getPolicySoapByScenario('0016a', customerDetails, policyNumber); const policySoap = MockPolicyData.getPolicySoapByScenario('0016a', customerDetails, policyNumber);
const advancedScenario0016Data: Partial<ITestData> = { const advancedScenario0016Data: Partial<ITestData> = {
@ -39,38 +39,37 @@ const advancedScenario0016Data: Partial<ITestData> = {
{ {
partQuestionType: PartQuestionType.WindshieldColor, partQuestionType: PartQuestionType.WindshieldColor,
isOnPage: true, isOnPage: true,
optionToSelect: 'Green Tint' optionToSelect: 'Solar, Third Visor Frit, soundproofing, Infrared Interlayer'
}, },
{ {
partQuestionType: PartQuestionType.DriverFrontColor, partQuestionType: PartQuestionType.DriverFrontColor,
isOnPage: true, isOnPage: true,
optionToSelect: 'Green Tint' optionToSelect: 'Solar, Driver side, Front'
}, },
{ {
partQuestionType: PartQuestionType.DriverRearColor, partQuestionType: PartQuestionType.DriverRearColor,
isOnPage: true, isOnPage: true,
optionToSelect: 'Green Tint' optionToSelect: 'Solar, Driver side, Rear'
}, },
{ {
partQuestionType: PartQuestionType.DriverVentColor, partQuestionType: PartQuestionType.DriverVentColor,
isOnPage: true, isOnPage: true,
optionToSelect: 'Green Tint', optionToSelect: 'Solar, Driver side, Rear'
secondaryQuestionOptionToSelect: 'solar, driver side, rear'
}, },
{ {
partQuestionType: PartQuestionType.PassengerFrontColor, partQuestionType: PartQuestionType.PassengerFrontColor,
isOnPage: true, isOnPage: true,
optionToSelect: 'Green Tint' optionToSelect: 'Solar, Passenger side, Front'
}, },
{ {
partQuestionType: PartQuestionType.PassengerRearColor, partQuestionType: PartQuestionType.PassengerRearColor,
isOnPage: true, isOnPage: true,
optionToSelect: 'Green Tint' optionToSelect: 'Solar, Passenger side, Rear'
}, },
{ {
partQuestionType: PartQuestionType.RearWindowColor, partQuestionType: PartQuestionType.RearWindowColor,
isOnPage: true, isOnPage: true,
optionToSelect: 'Green Tint' optionToSelect: 'Heated glass, Solar'
}, },
], ],
isSafelite: true, isSafelite: true,