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
}
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 advancedScenario0003Data: Partial<ITestData> = {
@ -33,6 +33,7 @@ const advancedScenario0003Data: Partial<ITestData> = {
isDuplicateClaim: false,
isPolicyFound: true,
isNoComp: false,
hasOemEndorsement: true,
hasStateLawPopup: false,
endorsements: undefined,
vehiclePartQuestions: [
@ -44,7 +45,7 @@ const advancedScenario0003Data: Partial<ITestData> = {
{
partQuestionType: PartQuestionType.PassengerRearColor,
isOnPage: true,
optionToSelect: 'Green Tint'
optionToSelect: 'Solar, Passenger side, Rear'
},
],
isSafelite: true,
@ -53,7 +54,7 @@ const advancedScenario0003Data: Partial<ITestData> = {
claimDetails: {
policyNumber: policyNumber,
policyDeductible: 50,
damageDate: '2016-01-02',
damageDate: '2026-01-02',
damageCause: faker.helpers.enumValue(DamageType)
},
policySoap: policySoap,

View file

@ -25,7 +25,7 @@ const customerDetails: ICustomerDetails = {
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 advancedScenario0015Data: Partial<ITestData> = {
@ -46,16 +46,16 @@ const advancedScenario0015Data: Partial<ITestData> = {
{
partQuestionType: PartQuestionType.WindshieldColor,
isOnPage: true,
optionToSelect: 'Green Tint, Blue Shade'
optionToSelect: 'Heated glass, Heated glass Wiper Park'
},
{
partQuestionType: PartQuestionType.DriverFrontColor,
isOnPage: true,
optionToSelect: 'Green Tint'
optionToSelect: 'Driver side, Front'
}
],
isSafelite: true,
servicePackage: faker.helpers.enumValue(ServicePackage),
servicePackage: ServicePackage.Premium,
customerDetails: customerDetails,
claimDetails: {
policyNumber: policyNumber,

View file

@ -25,7 +25,7 @@ const customerDetails: ICustomerDetails = {
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 advancedScenario0016Data: Partial<ITestData> = {
@ -39,38 +39,37 @@ const advancedScenario0016Data: Partial<ITestData> = {
{
partQuestionType: PartQuestionType.WindshieldColor,
isOnPage: true,
optionToSelect: 'Green Tint'
optionToSelect: 'Solar, Third Visor Frit, soundproofing, Infrared Interlayer'
},
{
partQuestionType: PartQuestionType.DriverFrontColor,
isOnPage: true,
optionToSelect: 'Green Tint'
optionToSelect: 'Solar, Driver side, Front'
},
{
partQuestionType: PartQuestionType.DriverRearColor,
isOnPage: true,
optionToSelect: 'Green Tint'
optionToSelect: 'Solar, Driver side, Rear'
},
{
partQuestionType: PartQuestionType.DriverVentColor,
isOnPage: true,
optionToSelect: 'Green Tint',
secondaryQuestionOptionToSelect: 'solar, driver side, rear'
optionToSelect: 'Solar, Driver side, Rear'
},
{
partQuestionType: PartQuestionType.PassengerFrontColor,
isOnPage: true,
optionToSelect: 'Green Tint'
optionToSelect: 'Solar, Passenger side, Front'
},
{
partQuestionType: PartQuestionType.PassengerRearColor,
isOnPage: true,
optionToSelect: 'Green Tint'
optionToSelect: 'Solar, Passenger side, Rear'
},
{
partQuestionType: PartQuestionType.RearWindowColor,
isOnPage: true,
optionToSelect: 'Green Tint'
optionToSelect: 'Heated glass, Solar'
},
],
isSafelite: true,