From 82602ea348087d24cadac513aa9f84bc809b839d Mon Sep 17 00:00:00 2001 From: JennyNou Date: Wed, 25 Mar 2026 09:51:45 -0400 Subject: [PATCH] Add part question responses to test case data --- .../tests/advanced/0003a_MobileAfterpay.ts | 7 ++++--- .../tests/advanced/0015a_NoCompPartQuestions.ts | 8 ++++---- .../tests/advanced/0016a_NoCompAllGlass.ts | 17 ++++++++--------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/playwright-tests/tests/advanced/0003a_MobileAfterpay.ts b/playwright-tests/tests/advanced/0003a_MobileAfterpay.ts index 6e494225..f205e795 100644 --- a/playwright-tests/tests/advanced/0003a_MobileAfterpay.ts +++ b/playwright-tests/tests/advanced/0003a_MobileAfterpay.ts @@ -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 = { @@ -33,6 +33,7 @@ const advancedScenario0003Data: Partial = { isDuplicateClaim: false, isPolicyFound: true, isNoComp: false, + hasOemEndorsement: true, hasStateLawPopup: false, endorsements: undefined, vehiclePartQuestions: [ @@ -44,7 +45,7 @@ const advancedScenario0003Data: Partial = { { partQuestionType: PartQuestionType.PassengerRearColor, isOnPage: true, - optionToSelect: 'Green Tint' + optionToSelect: 'Solar, Passenger side, Rear' }, ], isSafelite: true, @@ -53,7 +54,7 @@ const advancedScenario0003Data: Partial = { claimDetails: { policyNumber: policyNumber, policyDeductible: 50, - damageDate: '2016-01-02', + damageDate: '2026-01-02', damageCause: faker.helpers.enumValue(DamageType) }, policySoap: policySoap, diff --git a/playwright-tests/tests/advanced/0015a_NoCompPartQuestions.ts b/playwright-tests/tests/advanced/0015a_NoCompPartQuestions.ts index c4108bb4..063059f9 100644 --- a/playwright-tests/tests/advanced/0015a_NoCompPartQuestions.ts +++ b/playwright-tests/tests/advanced/0015a_NoCompPartQuestions.ts @@ -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 = { @@ -46,16 +46,16 @@ const advancedScenario0015Data: Partial = { { 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, diff --git a/playwright-tests/tests/advanced/0016a_NoCompAllGlass.ts b/playwright-tests/tests/advanced/0016a_NoCompAllGlass.ts index 2b735a66..4fd55d9c 100644 --- a/playwright-tests/tests/advanced/0016a_NoCompAllGlass.ts +++ b/playwright-tests/tests/advanced/0016a_NoCompAllGlass.ts @@ -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 = { @@ -39,38 +39,37 @@ const advancedScenario0016Data: Partial = { { 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,