From 3fe2e23959ac1bc1cc41983fe125c9850a3452da Mon Sep 17 00:00:00 2001 From: JennyNou Date: Mon, 30 Mar 2026 20:46:59 -0400 Subject: [PATCH 01/37] Update test data for scenarios --- .../tests/0005_EssentialReplaceDynamicAdas.ts | 2 +- .../0007_EssentialRepairHyundaiMobile.ts | 6 +-- .../0009_EssentialPartsServiceErrorBailout.ts | 2 +- .../0010_EssentialVehicleNotFoundBailout.ts | 4 +- .../0011_EssentialDoNotSeeShopBailout.ts | 4 +- .../tests/0012_EssentialUniqueGlass.ts | 9 ++-- .../tests/0013_EssentialReplace.ts | 47 ++++--------------- .../tests/0014_EssentialRepairMobile.ts | 6 +-- ...5_EssentialReplacePartsQuestionsDropoff.ts | 9 ++-- .../tests/0016_EssentialRepairInShop.ts | 4 +- .../tests/0018_EssentialTpaEnabledReplace.ts | 6 +-- .../0019_EssentialTpaEnabledReplaceRecal.ts | 5 +- .../0020_EssentialVehicleLookupBailout.ts | 4 +- .../0021_EssentialPriceServiceErrorBailout.ts | 4 +- .../0022_EssentialServiceableBigTruck.ts | 10 ++-- .../0023_EssentialNonServiceableBigTruck.ts | 10 ++-- ...0024_EssentialNonServiceableBigTruckVin.ts | 18 ++++--- .../tests/advanced/0008a_RepairTpa.ts | 4 +- .../tests/advanced/0021a_VehicleByPlate.ts | 10 ++-- .../0026a_NoDeductibleAdasBailout5.ts | 1 + 20 files changed, 71 insertions(+), 94 deletions(-) diff --git a/playwright-tests/tests/0005_EssentialReplaceDynamicAdas.ts b/playwright-tests/tests/0005_EssentialReplaceDynamicAdas.ts index 909f38b8..8f22d591 100644 --- a/playwright-tests/tests/0005_EssentialReplaceDynamicAdas.ts +++ b/playwright-tests/tests/0005_EssentialReplaceDynamicAdas.ts @@ -25,7 +25,7 @@ const essentialReplaceDynamicAdasData: Partial = { address: { street: faker.location.streetAddress(), city: 'Chicago', - state: 'Illinois', + state: 'ILLINOIS', postalCode: '60645', country: 'United States' } diff --git a/playwright-tests/tests/0007_EssentialRepairHyundaiMobile.ts b/playwright-tests/tests/0007_EssentialRepairHyundaiMobile.ts index 5a1d4c70..c4fff62b 100644 --- a/playwright-tests/tests/0007_EssentialRepairHyundaiMobile.ts +++ b/playwright-tests/tests/0007_EssentialRepairHyundaiMobile.ts @@ -23,9 +23,9 @@ const essentialRepairMobileHyundaiData: Partial = { 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: faker.location.streetAddress(), + street: '9220 Pennythorne Court', city: 'Raleigh', - state: 'North Carolina', + state: 'NORTH CAROLINA', postalCode: '27615', country: 'United States' } @@ -49,7 +49,7 @@ const essentialRepairMobileHyundaiData: Partial = { appointmentDetails: { serviceLocation: ServiceLocation.Mobile, serviceAddress: { - street: "2088 Haviland Road, Columbus, OH, USA", + street: "2088 Haviland Road", city:"Vermillion", state: "Ohio", postalCode: "44089", diff --git a/playwright-tests/tests/0009_EssentialPartsServiceErrorBailout.ts b/playwright-tests/tests/0009_EssentialPartsServiceErrorBailout.ts index d4f9a9b5..8da3a486 100644 --- a/playwright-tests/tests/0009_EssentialPartsServiceErrorBailout.ts +++ b/playwright-tests/tests/0009_EssentialPartsServiceErrorBailout.ts @@ -28,7 +28,7 @@ const essentialPartsServiceErrorData: Partial = { address: { street: faker.location.streetAddress(), city: 'Tulare', - state: 'California', + state: 'CALIFORNIA', postalCode: '93247', country: 'United States' } diff --git a/playwright-tests/tests/0010_EssentialVehicleNotFoundBailout.ts b/playwright-tests/tests/0010_EssentialVehicleNotFoundBailout.ts index a2515e6b..a604a635 100644 --- a/playwright-tests/tests/0010_EssentialVehicleNotFoundBailout.ts +++ b/playwright-tests/tests/0010_EssentialVehicleNotFoundBailout.ts @@ -26,9 +26,9 @@ const essentialVehicleNotFoundData: Partial = { 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: faker.location.streetAddress(), + street: '71529 Maple Street', city: 'Dublin', - state: 'Ohio', + state: 'OHIO', postalCode: '43016', country: 'United States' } diff --git a/playwright-tests/tests/0011_EssentialDoNotSeeShopBailout.ts b/playwright-tests/tests/0011_EssentialDoNotSeeShopBailout.ts index 9f9e2f13..cb14be46 100644 --- a/playwright-tests/tests/0011_EssentialDoNotSeeShopBailout.ts +++ b/playwright-tests/tests/0011_EssentialDoNotSeeShopBailout.ts @@ -25,9 +25,9 @@ const essentialDoNotSeeShopData: Partial = { 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: faker.location.streetAddress(), + street: '9799 Heartland Court', city: 'Dublin', - state: 'Ohio', + state: 'OHIO', postalCode: '43016', country: 'United States' } diff --git a/playwright-tests/tests/0012_EssentialUniqueGlass.ts b/playwright-tests/tests/0012_EssentialUniqueGlass.ts index 2cce1cef..3f79e9ab 100644 --- a/playwright-tests/tests/0012_EssentialUniqueGlass.ts +++ b/playwright-tests/tests/0012_EssentialUniqueGlass.ts @@ -22,9 +22,9 @@ const essentialUnqiqueGlassData: Partial = { 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: faker.location.streetAddress(), + street: '3202 S Mason Ave', city: 'Tacoma', - state: 'Washington', + state: 'WASHINGTON', postalCode: '98409', country: 'United States' } @@ -51,13 +51,12 @@ const essentialUnqiqueGlassData: Partial = { { partQuestionType: PartQuestionType.WindshieldColor, isOnPage: true, - optionToSelect: 'Green Tint' + optionToSelect: 'Third Visor Frit' }, { partQuestionType: PartQuestionType.DriverSideColor, isOnPage: true, - optionToSelect: 'Green Tint', - secondaryQuestionOptionToSelect: 'solar, driver side, rear' + optionToSelect: 'Solar, Driver side, Rear, Movable, Exc. 118" Wb, Aftermarket' }, ], appointmentDetails: { diff --git a/playwright-tests/tests/0013_EssentialReplace.ts b/playwright-tests/tests/0013_EssentialReplace.ts index 4e139432..f50889ec 100644 --- a/playwright-tests/tests/0013_EssentialReplace.ts +++ b/playwright-tests/tests/0013_EssentialReplace.ts @@ -13,46 +13,20 @@ const essentialReplaceData: Partial = { isPolicyFound: false, endorsements: [], isReplace: false, - vehiclePartQuestions: [ - { - partQuestionType: PartQuestionType.WindshieldColor, - isOnPage: true, - optionToSelect: 'Green Tint' - }, - { - partQuestionType: PartQuestionType.DriverFrontColor, - isOnPage: true, - optionToSelect: 'Green Tint' - }, - { - partQuestionType: PartQuestionType.DriverRearColor, - isOnPage: true, - optionToSelect: 'Green Tint' - }, - { - partQuestionType: PartQuestionType.PassengerFrontColor, - isOnPage: true, - optionToSelect: 'Green Tint' - }, - { - partQuestionType: PartQuestionType.PassengerRearColor, - isOnPage: true, - optionToSelect: 'Green Tint' - }, - ], + partQuestions: [], isSafelite: true, servicePackage: faker.helpers.enumValue(ServicePackage), customerDetails: { firstName: faker.person.firstName(), - lastName: 'Reed', + lastName: 'Tyler', 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: '10212 JEWEL CT',// DO NOT use fake address here as this scenario search vehicle by address //faker.location.streetAddress(), - city: 'CONROE', - state: 'Texas', - postalCode: '77385', + street: '503 OLD CHATTANOOGA PIKE SW CLEVELAND',// DO NOT use fake address here as this scenario search vehicle by address //faker.location.streetAddress(), + city: 'Cleveland', + state: 'TENNESSEE', + postalCode: '37311', country: 'United States' } }, @@ -63,11 +37,10 @@ const essentialReplaceData: Partial = { damageCause: DamageType.Other }, vehicleDetails: { - year: '2015', - make: 'Ford', - model: 'F Series F150', - style: '2 door super cab', - vin: '5N1AN0NW9BC524974', + year: '2010', + make: 'Lincoln', + model: 'MKZ', + style: '4 door sedan', vehicleLookupType: VehicleLookupType.Address, }, vehicleDamage: [ diff --git a/playwright-tests/tests/0014_EssentialRepairMobile.ts b/playwright-tests/tests/0014_EssentialRepairMobile.ts index 085b9fea..820e1951 100644 --- a/playwright-tests/tests/0014_EssentialRepairMobile.ts +++ b/playwright-tests/tests/0014_EssentialRepairMobile.ts @@ -23,9 +23,9 @@ const essentialRepairMobileData: Partial = { 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: faker.location.streetAddress(), - city: 'Dublin', - state: 'Ohio', + street: '123 Test Road', + city: 'Columbus', + state: 'OHIO', postalCode: '43016', country: 'United States' } diff --git a/playwright-tests/tests/0015_EssentialReplacePartsQuestionsDropoff.ts b/playwright-tests/tests/0015_EssentialReplacePartsQuestionsDropoff.ts index de719a2f..0c2314f8 100644 --- a/playwright-tests/tests/0015_EssentialReplacePartsQuestionsDropoff.ts +++ b/playwright-tests/tests/0015_EssentialReplacePartsQuestionsDropoff.ts @@ -17,7 +17,7 @@ const essentialReplaceData: Partial = { { partQuestionType: PartQuestionType.WindshieldColor, isOnPage: true, - optionToSelect: 'Green Tint, Blue Shade' + optionToSelect: 'Solar' }, // { // partQuestionType: PartQuestionType.DriverFrontColor, @@ -35,10 +35,9 @@ const essentialReplaceData: Partial = { 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: faker.location.streetAddress(), - street: '456 Columbus Pike', - city: 'Dublin', - state: 'Ohio', + street: '1000 Hart Road', + city: 'Columbus', + state: 'OHIO', postalCode: '43223', country: 'United States' } diff --git a/playwright-tests/tests/0016_EssentialRepairInShop.ts b/playwright-tests/tests/0016_EssentialRepairInShop.ts index 735f275a..b98e5c69 100644 --- a/playwright-tests/tests/0016_EssentialRepairInShop.ts +++ b/playwright-tests/tests/0016_EssentialRepairInShop.ts @@ -23,9 +23,9 @@ const essentialHappyPathData: Partial = { 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: faker.location.streetAddress(), + street: '6400 Emerald Parkway', city: 'Dublin', - state: 'Ohio', + state: 'OHIO', postalCode: '43016', country: 'United States' } diff --git a/playwright-tests/tests/0018_EssentialTpaEnabledReplace.ts b/playwright-tests/tests/0018_EssentialTpaEnabledReplace.ts index 73f29276..d6bed423 100644 --- a/playwright-tests/tests/0018_EssentialTpaEnabledReplace.ts +++ b/playwright-tests/tests/0018_EssentialTpaEnabledReplace.ts @@ -26,13 +26,11 @@ const essentialTpaEnabledData: Partial = { 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]/), - // phoneNumber: faker.phone.toString(), notes: 'Automated Test', address: { - // street: faker.location.streetAddress(), - street: '134 Woodlands Place', + street: '3300 Refugee Rd', city: 'Dublin', - state: 'Ohio', + state: 'OHIO', postalCode: '43232', country: 'United States' } diff --git a/playwright-tests/tests/0019_EssentialTpaEnabledReplaceRecal.ts b/playwright-tests/tests/0019_EssentialTpaEnabledReplaceRecal.ts index 839dbad1..37fbdddc 100644 --- a/playwright-tests/tests/0019_EssentialTpaEnabledReplaceRecal.ts +++ b/playwright-tests/tests/0019_EssentialTpaEnabledReplaceRecal.ts @@ -30,10 +30,9 @@ const essentialTpaEnabledData: Partial = { // phoneNumber: faker.phone.toString(), notes: 'Automated Test', address: { - // street: faker.location.streetAddress(), - street: '134 Woodlands Place', + street: '1st St S', city: 'Jacksonville Beach', - state: 'Florida', + state: 'FLORIDA', postalCode: '32250', country: 'United States' } diff --git a/playwright-tests/tests/0020_EssentialVehicleLookupBailout.ts b/playwright-tests/tests/0020_EssentialVehicleLookupBailout.ts index 77322774..a70e8da0 100644 --- a/playwright-tests/tests/0020_EssentialVehicleLookupBailout.ts +++ b/playwright-tests/tests/0020_EssentialVehicleLookupBailout.ts @@ -26,9 +26,9 @@ const essentialVehicleLookupBailoutData: Partial = { 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: faker.location.streetAddress(), + street: '6400 Emerald Parkway', city: 'Dublin', - state: 'Ohio', + state: 'OHIO', postalCode: '43016', country: 'United States' } diff --git a/playwright-tests/tests/0021_EssentialPriceServiceErrorBailout.ts b/playwright-tests/tests/0021_EssentialPriceServiceErrorBailout.ts index e7d5f69c..a0c4e08a 100644 --- a/playwright-tests/tests/0021_EssentialPriceServiceErrorBailout.ts +++ b/playwright-tests/tests/0021_EssentialPriceServiceErrorBailout.ts @@ -26,9 +26,9 @@ const essentialPriceServiceErrorBailoutData: Partial = { 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: faker.location.streetAddress(), + street: '9799 Heartland Court', city: 'Dublin', - state: 'Ohio', + state: 'OHIO', postalCode: '43016', country: 'United States' } diff --git a/playwright-tests/tests/0022_EssentialServiceableBigTruck.ts b/playwright-tests/tests/0022_EssentialServiceableBigTruck.ts index f50db3cc..f3014dee 100644 --- a/playwright-tests/tests/0022_EssentialServiceableBigTruck.ts +++ b/playwright-tests/tests/0022_EssentialServiceableBigTruck.ts @@ -13,12 +13,14 @@ const essentialServiceableBigTruckData: Partial = { isPolicyFound: false, endorsements: [], isReplace: true, + bailoutFlags: { + isHeavyTruckVehicleBailout: true, + }, vehiclePartQuestions: [ { partQuestionType: PartQuestionType.WindshieldColor, isOnPage: true, - optionToSelect: 'Green Tint', - secondaryQuestionOptionToSelect: 'one-piece, w/lane departure warning system', + optionToSelect: 'One-Piece, With Lane Departure Warning System', }, ], isSafelite: true, @@ -30,9 +32,9 @@ const essentialServiceableBigTruckData: Partial = { phoneNumber: faker.helpers.fromRegExp(/[2-9][0-9][0-9]-[0-9]{3}-[0-9]{4}/), notes: 'Automated Test', address: { - street: faker.location.streetAddress(), + street: '9799 Heartland Court', city: 'Dublin', - state: 'Ohio', + state: 'OHIO', postalCode: '43016', country: 'United States' } diff --git a/playwright-tests/tests/0023_EssentialNonServiceableBigTruck.ts b/playwright-tests/tests/0023_EssentialNonServiceableBigTruck.ts index 5979bf48..343c5755 100644 --- a/playwright-tests/tests/0023_EssentialNonServiceableBigTruck.ts +++ b/playwright-tests/tests/0023_EssentialNonServiceableBigTruck.ts @@ -11,6 +11,10 @@ const essentialNonServiceableBigTruckData: Partial = { clientTag: 'ALL_ESSENTIAL', isDuplicateClaim: false, isPolicyFound: false, + isNonServiceable: true, + bailoutFlags: { + isHeavyTruckVehicleBailout: true, + }, endorsements: [], isReplace: true, partQuestions: undefined, @@ -23,9 +27,9 @@ const essentialNonServiceableBigTruckData: Partial = { phoneNumber: faker.helpers.fromRegExp(/[2-9][0-9][0-9]-[0-9]{3}-[0-9]{4}/), notes: 'Automated Test', address: { - street: faker.location.streetAddress(), + street: '9799 Heartland Court', city: 'Dublin', - state: 'Ohio', + state: 'OHIO', postalCode: '43016', country: 'United States' } @@ -50,8 +54,6 @@ const essentialNonServiceableBigTruckData: Partial = { shopAddress: '6826 Sawmill Rd, Columbus, OH 43235', appointmentDate: nextWeekday }, - isNonServiceable: true, - } const essentialClients = ClientData.getEssentialClients(); diff --git a/playwright-tests/tests/0024_EssentialNonServiceableBigTruckVin.ts b/playwright-tests/tests/0024_EssentialNonServiceableBigTruckVin.ts index af0c091f..e4bb11bb 100644 --- a/playwright-tests/tests/0024_EssentialNonServiceableBigTruckVin.ts +++ b/playwright-tests/tests/0024_EssentialNonServiceableBigTruckVin.ts @@ -13,26 +13,31 @@ const essentialNonServiceableBigTruckVinData: Partial = { isPolicyFound: false, endorsements: [], isReplace: true, + isNonServiceable: true, + bailoutFlags: { + isHeavyTruckVehicleBailout: true, + isBailoutAfterVinLookup: true, + }, vehiclePartQuestions: [ { partQuestionType: PartQuestionType.WindshieldColor, isOnPage: true, optionToSelect: 'Green Tint', - secondaryQuestionOptionToSelect: 'one-piece, w/lane departure warning system', + secondaryQuestionOptionToSelect: 'One-Piece, With Lane Departure Warning System', }, ], isSafelite: true, servicePackage: faker.helpers.enumValue(ServicePackage), customerDetails: { - firstName: faker.person.firstName(), - lastName: faker.person.lastName(), + firstName: 'John', + lastName: 'Doe', email: "itqatest@safelite.com", phoneNumber: faker.helpers.fromRegExp(/[2-9][0-9][0-9]-[0-9]{3}-[0-9]{4}/), notes: 'Automated Test', address: { - street: faker.location.streetAddress(), + street: '9799 Heartland Court', city: 'Dublin', - state: 'Ohio', + state: 'OHIO', postalCode: '43016', country: 'United States' } @@ -48,7 +53,7 @@ const essentialNonServiceableBigTruckVinData: Partial = { make: 'Freightliner', model: 'Cascadia', style: 'conventional cab', - vin: 'JALB4T177G7W00847', + vin: '2G5ZJ2TZ4S9105926', vehicleLookupType: VehicleLookupType.Vin, }, vehicleDamage: [ @@ -59,7 +64,6 @@ const essentialNonServiceableBigTruckVinData: Partial = { shopAddress: '6826 Sawmill Rd, Columbus, OH 43235', appointmentDate: nextWeekday }, - isNonServiceableVin: true, } const essentialClients = ClientData.getEssentialClients(); diff --git a/playwright-tests/tests/advanced/0008a_RepairTpa.ts b/playwright-tests/tests/advanced/0008a_RepairTpa.ts index 2404f831..85b353be 100644 --- a/playwright-tests/tests/advanced/0008a_RepairTpa.ts +++ b/playwright-tests/tests/advanced/0008a_RepairTpa.ts @@ -13,7 +13,7 @@ const customerAddress: IAddress = { street: faker.location.streetAddress(), city: 'Hamden', state: 'CONNECTICUT', - postalCode: '06517', + postalCode: '06518', country: 'United States' } const customerDetails: ICustomerDetails = { @@ -33,7 +33,7 @@ const advancedScenario0008Data: Partial = { isDuplicateClaim: false, isPolicyFound: true, isNoComp: false, - hasStateLawPopup: false, + hasStateLawPopup: true, endorsements: undefined, vehiclePartQuestions: [ // { diff --git a/playwright-tests/tests/advanced/0021a_VehicleByPlate.ts b/playwright-tests/tests/advanced/0021a_VehicleByPlate.ts index f5acaccf..711ab691 100644 --- a/playwright-tests/tests/advanced/0021a_VehicleByPlate.ts +++ b/playwright-tests/tests/advanced/0021a_VehicleByPlate.ts @@ -15,10 +15,10 @@ const customerDetails: ICustomerDetails = { phoneNumber: '614-531-0031', notes: 'Automated Test', address: { - street: faker.location.streetAddress(), - city: 'San Jose', - state: 'CA', - postalCode: '97230-6373', + street: '15603 NE Tillamook S', + city: 'Portland', + state: 'OREGON', + postalCode: '97230', country: 'United States' } } @@ -32,7 +32,7 @@ const advancedScenario0021Data: Partial = { isPolicyFound: true, isUnverifiedPolicyAfterVehicleLookup: true, isNoComp: false, - hasStateLawPopup: true, + hasStateLawPopup: false, endorsements: undefined, isUseVehicleOnPolicy: false, isVehicleLookupValidations: true, diff --git a/playwright-tests/tests/advanced/0026a_NoDeductibleAdasBailout5.ts b/playwright-tests/tests/advanced/0026a_NoDeductibleAdasBailout5.ts index c70be807..63902ced 100644 --- a/playwright-tests/tests/advanced/0026a_NoDeductibleAdasBailout5.ts +++ b/playwright-tests/tests/advanced/0026a_NoDeductibleAdasBailout5.ts @@ -34,6 +34,7 @@ const advancedScenario0026aData: Partial = { hasStateLawPopup: false, isRecalNotification: true, endorsements: undefined, + isRecalVehicle: true, bailoutFlags: { }, vehiclePartQuestions: [ From eee3ff375d13718df3cbec96db119dff6c633616 Mon Sep 17 00:00:00 2001 From: JennyNou Date: Mon, 30 Mar 2026 20:47:39 -0400 Subject: [PATCH 02/37] Fix part question validation --- playwright-tests/pages/VehiclePartsPage.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/playwright-tests/pages/VehiclePartsPage.ts b/playwright-tests/pages/VehiclePartsPage.ts index 70d9a7ee..9a34fd9a 100644 --- a/playwright-tests/pages/VehiclePartsPage.ts +++ b/playwright-tests/pages/VehiclePartsPage.ts @@ -11,8 +11,10 @@ export default class VehiclePartQuestionsPage extends PartQuestionsPage{ async selectPartQuestionResponses(partQuestions: IPartQuestion[]) { for (const pq of partQuestions) { + const escaped = pq.optionToSelect.replace(/"/g, '\\"'); const parentobject=this.page.locator(`fieldset[aria-labelledby="${pq.partQuestionType}"]`); - const partQuestionOptionButton = parentobject.locator(`[buttonlabel="${pq.optionToSelect}"]`); + const partQuestionOptionButton = parentobject.locator(`[buttonlabel="${escaped}"]`); + await partQuestionOptionButton.nth(0).click(); if (pq.secondaryQuestionOptionToSelect != null) { const secondaryQuestionButton = parentobject.getByText(`${pq.secondaryQuestionOptionToSelect}`); From 9baff87412304da77d3e2035c988cbb962a9e117 Mon Sep 17 00:00:00 2001 From: JennyNou Date: Mon, 30 Mar 2026 20:48:37 -0400 Subject: [PATCH 03/37] Fix cart validation for TPA submit page --- playwright-tests/pages/TpaSubmitPage.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/playwright-tests/pages/TpaSubmitPage.ts b/playwright-tests/pages/TpaSubmitPage.ts index 0439adbe..49891145 100644 --- a/playwright-tests/pages/TpaSubmitPage.ts +++ b/playwright-tests/pages/TpaSubmitPage.ts @@ -21,9 +21,13 @@ export class TpaSubmitPage extends BasePage { this.deductible = page.locator('span#deductible-value, span.deductible-value'); } - async validateDeductible(claimDetails: IClaimDetails) { - await expect(this.deductible).toContainText(claimDetails.policyDeductible.toLocaleString()); - } + async validateDeductible(claimDetails: IClaimDetails, isUnverifiedPolicyAfterVehicleLookup: boolean, isPolicyFound: boolean) { + const deductibleTextValue = await this.deductible.textContent(); + if (claimDetails.policyDeductible !== -1 && !isUnverifiedPolicyAfterVehicleLookup) { + expect.soft(deductibleTextValue).toContain(claimDetails.policyDeductible.toLocaleString()); + } else + expect.soft(deductibleTextValue).toEqual('Verifying coverage'); + } // TODO: Validate change preferred shop and contact details flows } \ No newline at end of file From a3a328be73f2ffc0e114ecb6c760eb5d2d25f08b Mon Sep 17 00:00:00 2001 From: JennyNou Date: Mon, 30 Mar 2026 20:50:01 -0400 Subject: [PATCH 04/37] Add bailout flags --- playwright-tests/business-logic/types/IBailoutFlags.ts | 3 ++- playwright-tests/pages/BailoutPage.ts | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/playwright-tests/business-logic/types/IBailoutFlags.ts b/playwright-tests/business-logic/types/IBailoutFlags.ts index 9889e337..b5a35369 100644 --- a/playwright-tests/business-logic/types/IBailoutFlags.ts +++ b/playwright-tests/business-logic/types/IBailoutFlags.ts @@ -8,5 +8,6 @@ export default interface IBailoutFlags { isVehicleLookupBailout: boolean, isPriceServiceErrorBailout: boolean, isCoverageCancelledByUser: boolean, - isAPIErrorBailout: boolean + isAPIErrorBailout: boolean, + isBailoutAfterVinLookup: boolean, } \ No newline at end of file diff --git a/playwright-tests/pages/BailoutPage.ts b/playwright-tests/pages/BailoutPage.ts index a75e98fe..805276bc 100644 --- a/playwright-tests/pages/BailoutPage.ts +++ b/playwright-tests/pages/BailoutPage.ts @@ -18,8 +18,6 @@ export class BailoutPage extends BasePage { this.lastNameTextBox = this.page.locator('#lastNameField'); this.phoneNumberTextBox = this.page.locator('#phoneNumberField'); this.emailAddressTextBox = this.page.locator('#emailAddressField'); - // this.page.waitForLoadState(); - // this.validateURL(this.url); } async validateBailoutDetails(customerDetails: ICustomerDetails, bailoutCode: number) { @@ -31,6 +29,10 @@ export class BailoutPage extends BasePage { expect.soft(await this.getBailoutCode()).toEqual(bailoutCode); } + async validateBailoutCode(bailoutCode: number) { + expect.soft(await this.getBailoutCode()).toEqual(bailoutCode); + } + async validateBailoutDetailsNotNull(){ await this.firstNameTextBox.waitFor({state:'visible'}) expect(this.firstNameTextBox.inputValue()).not.toBe(''); From e440a3b60cf5a70cd92165cf704054ffea260a93 Mon Sep 17 00:00:00 2001 From: JennyNou Date: Mon, 30 Mar 2026 20:50:24 -0400 Subject: [PATCH 05/37] Fix cart validations on order confirmation page --- .../pages/OrderConfirmationPage.ts | 39 ++++++++++++------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/playwright-tests/pages/OrderConfirmationPage.ts b/playwright-tests/pages/OrderConfirmationPage.ts index 9c8f22fd..6e957c54 100644 --- a/playwright-tests/pages/OrderConfirmationPage.ts +++ b/playwright-tests/pages/OrderConfirmationPage.ts @@ -62,7 +62,7 @@ export class OrderConfirmationPage extends BasePage { // Derived conditions const isItacOrNoComp = !!(isItac || isNoComp); - const isUnverified = !isPolicyFound; + const isUnverified = !isPolicyFound && claimDetails!.policyDeductible === -1; const isUnverifiedPolicyAfterVehicleLookup = testData.isUnverifiedPolicyAfterVehicleLookup === true; const hasPremiumOrStandard = (claimDetails!.policyDeductible >= 0 || !isPolicyFound) && @@ -84,13 +84,11 @@ export class OrderConfirmationPage extends BasePage { const lineItemsValue = await textIf(hasPremiumOrStandard, this.cartLineItemsText); const deductibleTextValue = await textIf(!isItacOrNoComp, this.deductibleText); const subtotalTextValue = await textIf((hasPremiumOrStandard || isItacOrNoComp) && !isUnverified && !isUnverifiedPolicyAfterVehicleLookup, this.subtotalText); - const totalAmountDueValue = await textIf((hasPremiumOrStandard && !payAtService) || (isItacOrNoComp && !payAtService) && !isUnverified && !isUnverifiedPolicyAfterVehicleLookup, this.totalAmountDueText); - const amountPaidTextValue = await textIf((hasPremiumOrStandard && !payAtService) || (isItacOrNoComp && !payAtService) && !isUnverified && !isUnverifiedPolicyAfterVehicleLookup, this.totalAmountDueText); - const finalAmountDueValue = await textIf(hasPremiumOrStandard || isItacOrNoComp || isUnverified || isUnverifiedPolicyAfterVehicleLookup, this.finalAmountDue); + const totalAmountDueValue = await textIf((hasPremiumOrStandard && !payAtService) && (isItacOrNoComp && !payAtService) && !isUnverified && !isUnverifiedPolicyAfterVehicleLookup, this.totalAmountDueText); + const amountPaidTextValue = await textIf((hasPremiumOrStandard && !payAtService) && (isItacOrNoComp && !payAtService) && !isUnverified && !isUnverifiedPolicyAfterVehicleLookup, this.totalAmountDueText); + const finalAmountDueValue = await textIf((hasPremiumOrStandard && isItacOrNoComp) || (hasPremiumOrStandard && isUnverified), this.finalAmountDue); const confirmationTextValue = await this.confirmationText.textContent(); - - // General Validations expect.soft(this.serviceText).toBeVisible();; expect.soft(this.successHeader).toBeVisible(); @@ -115,15 +113,24 @@ export class OrderConfirmationPage extends BasePage { if (isPolicyFound && (claimDetails!.policyDeductible === 0 && (servicePackage === ServicePackage.GlassOnly))) { const zeroDeductibleText = await this.deductibleText.textContent(); expect.soft(zeroDeductibleText).toEqual('$0.00'); - } else if (isPolicyFound && claimDetails!.policyDeductible > 0 && !(isItac || isNoComp) && servicePackage === ServicePackage.GlassOnly){ + } else if (isPolicyFound && claimDetails!.policyDeductible > 0 && !(isItac || isNoComp) && !isUnverifiedPolicyAfterVehicleLookup && servicePackage === ServicePackage.GlassOnly){ expect.soft(deductibleTextValue).not.toBeNull(); const deductibleAmt = deductibleTextValue ? Number.parseFloat(deductibleTextValue.split('$')[1].replaceAll(',', '')) : 0; expect.soft(deductibleAmt).toEqual(claimDetails!.policyDeductible); - - } else if ((isPolicyFound || isItac || (isNoComp && paymentDetails!.paymentType === PaymentType.PayAtService)) && !isUnverifiedPolicyAfterVehicleLookup && finalAmountDueValue !== null && subtotalTextValue !== null) { + + } else if (isPolicyFound && claimDetails!.policyDeductible > 0 && !(isItac || isNoComp) && !isUnverifiedPolicyAfterVehicleLookup && hasPremiumOrStandard && !payAtService) { + // Policy found, deductible > 0, Standard/Premium package, paid with PIA (not pay-at-service) + expect.soft(deductibleTextValue).not.toBeNull(); + const deductibleAmt = deductibleTextValue ? Number.parseFloat(deductibleTextValue.split('$')[1].replaceAll(',', '')) : 0; + expect.soft(deductibleAmt).toEqual(claimDetails!.policyDeductible); + + const totalAmountDueAmt = totalAmountDueValue ? Number.parseFloat(totalAmountDueValue!.split('$')[1].replaceAll(',', '')) : null; + const amountPaidValue = amountPaidTextValue ? Number.parseFloat(amountPaidTextValue!.split('$')[1].replaceAll(',', '')) : null; + expect.soft(amountPaidValue).toEqual(totalAmountDueAmt); + + } else if ((isPolicyFound && isItac && (isNoComp && paymentDetails!.paymentType === PaymentType.PayAtService)) && !isUnverifiedPolicyAfterVehicleLookup && finalAmountDueValue !== null && subtotalTextValue !== null) { // Extract numbers const deductibleAmt = deductibleTextValue ? Number.parseFloat(deductibleTextValue.split('$')[1].replaceAll(',', '')) : null; - const subtotalAmt = subtotalTextValue ? Number.parseFloat(subtotalTextValue!.split('$')[1].replaceAll(',', '')) : null; @@ -146,13 +153,15 @@ export class OrderConfirmationPage extends BasePage { expect.soft(amountPaidValue).toEqual(totalAmountDueAmt); expect.soft(finalAmountDueAmt).toEqual(0); } + } else if (isUnverified && servicePackage === ServicePackage.GlassOnly) { + expect.soft(deductibleTextValue).toEqual('Verifying coverage'); } else { - // essential flows will have deductible and amount due as "Verifying coverage" - const verifyingCoverageText = this.unverifiedCoverageDeductibleText; - - expect.soft(verifyingCoverageText).toContainText('Verifying coverage'); + if (isUnverified && servicePackage !== ServicePackage.GlassOnly) { + // essential flows will have deductible and amount due as "Verifying coverage"; + expect.soft(deductibleTextValue).toEqual('Verifying coverage'); expect.soft(finalAmountDueValue).toEqual('Verifying coverage'); - } + } + } } async validateOrderNumber() { From 5ca23e64c7430d73ab274a3fc0aaef6d9dec9ff8 Mon Sep 17 00:00:00 2001 From: JennyNou Date: Mon, 30 Mar 2026 20:51:04 -0400 Subject: [PATCH 06/37] Add wait time for next button to be clicked on --- playwright-tests/pages/PaypalPage.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/playwright-tests/pages/PaypalPage.ts b/playwright-tests/pages/PaypalPage.ts index adb6ba5d..d1c30c6c 100644 --- a/playwright-tests/pages/PaypalPage.ts +++ b/playwright-tests/pages/PaypalPage.ts @@ -25,6 +25,7 @@ export class PaypalPage extends BasePage { async completePaypalPurchase(paymentDetails: IPaymentDetails) { await this.usernameTextBox.fill(paymentDetails.username!); + await this.nextButton.waitFor({ state: 'visible', timeout: 10000 }); await this.nextButton.click(); await this.passwordTextBox.fill(paymentDetails.password!); await this.paypalLoginButton.click(); From e940bf1eb3b65dd267e9936279c3217ab1f0d3f7 Mon Sep 17 00:00:00 2001 From: JennyNou Date: Mon, 30 Mar 2026 20:51:28 -0400 Subject: [PATCH 07/37] Add recal vehicle flag --- playwright-tests/business-logic/types/ITestData.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/playwright-tests/business-logic/types/ITestData.ts b/playwright-tests/business-logic/types/ITestData.ts index 05bcbabd..3d350351 100644 --- a/playwright-tests/business-logic/types/ITestData.ts +++ b/playwright-tests/business-logic/types/ITestData.ts @@ -36,6 +36,7 @@ export interface ITestData { paymentDetails: IPaymentDetails // Payment information isRecalNotification: boolean, isRecalWarning: boolean, + isRecalVehicle: boolean, isSeparateApptsWarning: boolean, // IF true, check for the separate appts warning on VehicleDamagePage isAuthenticationRequired: boolean, isMoldingQuestion: boolean, From 0f363d8262e3205e6b5051014944be5650298578 Mon Sep 17 00:00:00 2001 From: JennyNou Date: Mon, 30 Mar 2026 20:52:02 -0400 Subject: [PATCH 08/37] Clean up provider preference methods --- playwright-tests/pages/ProviderPreferencePage.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/playwright-tests/pages/ProviderPreferencePage.ts b/playwright-tests/pages/ProviderPreferencePage.ts index 97afe80f..50b1a617 100644 --- a/playwright-tests/pages/ProviderPreferencePage.ts +++ b/playwright-tests/pages/ProviderPreferencePage.ts @@ -40,17 +40,11 @@ export class ProviderPreferencePage extends BasePage { this.stateLawModalOkayButton = this.page.getByRole('button', { name: 'Okay' }) } - async selectProvider(isSafelite = true) { + async selectProvider(isSafelite: boolean) { if (isSafelite) { await this.scheduleNowButton.click(); await this.nextPage(); } - else { - await this.findAnotherShopButton.waitFor({ state: 'visible' }); - await this.findAnotherShopButton.click(); - await this.tpaRecalModal.waitFor({ state: 'visible' }); - await this.scheduleTPAWithAdas(); - } } async scheduleWithSafeliteADAS() { @@ -60,8 +54,11 @@ export class ProviderPreferencePage extends BasePage { } async scheduleTPAWithAdas() { + await this.findAnotherShopButton.waitFor({ state: 'visible' }); + await this.findAnotherShopButton.click(); + await this.tpaRecalModal.waitFor({ state: 'visible' }); await this.learnMoreLink.click(); - await this.noButton.click(); + await this.noButton.click(); // continue to schedule with TPA even with recal disclaimer await this.acknowledgeAdasCheckbox.click(); await this.tpaRecalModalContinueButton.click(); } From fd98a3b29a5091ec5e5a20af90ca91f328bf9647 Mon Sep 17 00:00:00 2001 From: JennyNou Date: Mon, 30 Mar 2026 20:53:20 -0400 Subject: [PATCH 09/37] Update flows for bailout scenarios --- playwright-tests/tests/0000__M.test.ts | 94 ++++++++++++++++++++------ 1 file changed, 72 insertions(+), 22 deletions(-) diff --git a/playwright-tests/tests/0000__M.test.ts b/playwright-tests/tests/0000__M.test.ts index 537ecfe4..c7b2c5c0 100644 --- a/playwright-tests/tests/0000__M.test.ts +++ b/playwright-tests/tests/0000__M.test.ts @@ -381,13 +381,13 @@ async function runWorkflow(page: Page, testCase: TestCase) { } // Destructure data for easy access - const { customerDetails, claimDetails, vehicleDetails, vehicleDamage, + const { customerDetails, claimDetails, vehicleDetails, addressVehicleDetails, vehicleDamage, appointmentDetails, isSafelite, endorsements, partQuestions, paymentDetails, isNoComp, isItac, isRecalNotification, isUnverifiedPolicyAfterVehicleLookup, - isRecalWarning, servicePackage, hasOemEndorsement, hasStateLawPopup, otherVehiclesOnPolicy, + isRecalWarning, servicePackage, hasOemEndorsement, hasStateLawPopup, otherVehiclesOnPolicy, isUseVehicleFromAddressLookup, isSeparateApptsWarning, vehiclePartQuestions, editVehicleDetails, isAddressLookupValidations, hasMilitaryWarning, capabilityQuestions, isUseVehicleOnPolicy, - isVehicleLookupValidations, isMoldingQuestion, isNonServiceable, isNonServiceableVin } = testCase.testData; + isVehicleLookupValidations, isMoldingQuestion, isNonServiceable, isNonServiceableVin, isRecalVehicle } = testCase.testData; let { isPolicyFound } = testCase.testData; // Allow isPolicyFound to be re-assigned @@ -399,12 +399,12 @@ async function runWorkflow(page: Page, testCase: TestCase) { endorsementsPage, vehicleLookupPage, partQuestionsPage, paymentMethodPage, vehicleLookupAddressPage, vehicleLookupLicensePage, vinLookupPage, bailoutPage, tpaSearchPage, tpaSubmitPage, tpaConfirmationPage, - vehiclePartQuestionsPage, capabilityQuestionsPage, moldingQuestionsPage, addressLookupPage } = testCase.pages; + vehiclePartQuestionsPage, capabilityQuestionsPage, moldingQuestionsPage, addressLookupPage, addressVehiclesPage } = testCase.pages; // Destructure bailout flags const { isVehicleSelectBailout, isTpaNotEnabledBailout, isAPIErrorBailout, isVehicleLookupBailout, isPriceServiceErrorBailout, - isRequestCallbackBailout, isHeavyTruckVehicleBailout, isCoverageCancelledByUser } = testCase.testData.bailoutFlags || {}; + isRequestCallbackBailout, isHeavyTruckVehicleBailout, isCoverageCancelledByUser, isBailoutAfterVinLookup } = testCase.testData.bailoutFlags || {}; const repairTypes: VehicleDamage[] = [ VehicleDamage.WindshieldOneChip, @@ -521,6 +521,12 @@ async function runWorkflow(page: Page, testCase: TestCase) { await vehicleSelectionPage.nextPage(); }); + if (isNonServiceable && isHeavyTruckVehicleBailout && !isBailoutAfterVinLookup) { + await bailoutPage.validateURL(bailoutPage.issPageValue); + await bailoutPage.validateBailoutCode(BailoutCode.HeavyTruckVehicle); + return; + } + await test.step('PolicyHolderDetailsPage >> Enter customer data', async () => { await policyHolderDetailsPage.validateURL(policyHolderDetailsPage.issPageValue); await policyHolderDetailsPage.fillCustomerDetails(customerDetails!); @@ -594,14 +600,12 @@ async function runWorkflow(page: Page, testCase: TestCase) { }); await test.step('Address Vehicles >> Next page', async () => { - await addressLookupPage.nextPage(); + await addressVehiclesPage.validateURL(addressVehiclesPage.issPageValue); + await addressVehiclesPage.selectVehicle(addressVehicleDetails!); + await addressVehiclesPage.nextPage(); }); } else { - await test.step('VehicleLookupAddressPage >> Lookup by address: ' + customerDetails!.address.street, async () => { - await vehicleLookupAddressPage.validateURL(vehicleLookupAddressPage.issPageValue); - await vehicleLookupAddressPage.lookupVehicleByAddress(customerDetails!, vehicleDetails!); - await vehicleLookupAddressPage.nextPage(); - }); + break; } break; case VehicleLookupType.LicensePlateNumber: @@ -623,6 +627,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { await test.step('VinLookupPage >> Lookup by VIN: ' + vehicleDetails!.vin!, async () => { await vinLookupPage.validateURL(vinLookupPage.issPageValue); await vinLookupPage.enterVin(vehicleDetails!.vin!, isVehicleLookupValidations); + if (isNonServiceableVin) { await vinLookupPage.handleNonServiceableVin(); return; @@ -662,6 +667,12 @@ async function runWorkflow(page: Page, testCase: TestCase) { await partQuestionsPage.nextPage(); } + if (isHeavyTruckVehicleBailout && isBailoutAfterVinLookup) { + await bailoutPage.validateURL(bailoutPage.issPageValue); + await bailoutPage.validateBailoutCode(BailoutCode.HeavyTruckVehicle); + return; + } + if (vehiclePartQuestions && vehiclePartQuestions.length > 0) { await vehiclePartQuestionsPage.validateURL(vehiclePartQuestionsPage.issPageValue); await vehiclePartQuestionsPage.selectPartQuestionResponses(vehiclePartQuestions); @@ -675,8 +686,8 @@ async function runWorkflow(page: Page, testCase: TestCase) { }); await test.step('BailoutPage >> User canceled claim on ITAC/No Comp coverage statement', async () => { - await bailoutPage.validateURL(bailoutPage.issPageValue); - await bailoutPage.validateBailoutDetails(customerDetails!, BailoutCode.CoverageCancelledByUser); + await bailoutPage.validateBailoutDetails(customerDetails!, BailoutCode.CoverageCancelledByUser); + await bailoutPage.validateURL(bailoutPage.issPageValue); }); return; } @@ -717,8 +728,16 @@ async function runWorkflow(page: Page, testCase: TestCase) { await coverageStatementPage.handleUnverifiedPolicyAfterVehicleLookupFlow(); } + if (isUseVehicleFromAddressLookup) { + await coverageStatementPage.handleUnverifiedPolicyAfterVehicleLookupFlow(); + } + }); + + // If No-Comp or ITAC, ProviderPreferencePage does not appear + if (!isNoComp && !isItac) { + if (hasStateLawPopup) { await test.step('ProviderPreferencePage >> Dismiss state law popup', async () => { await providerPreferencePage.validateURL(providerPreferencePage.issPageValue); @@ -730,12 +749,42 @@ async function runWorkflow(page: Page, testCase: TestCase) { }); } - if (!isPolicyFound || !(isItac || isNoComp) && !isUnverifiedPolicyAfterVehicleLookup) { - await test.step('ProviderPreferencePage >> Select Provider ' + isSafelite ? "Safelite" : "Other shops(Non-Safelite)", async () => { + if (isPolicyFound && isSafelite) { + await test.step('ProviderPreferencePage >> Select Safelite provider', async () => { + await providerPreferencePage.validateURL(providerPreferencePage.issPageValue); + await providerPreferencePage.selectProvider(isSafelite); + }); +} + + if (isPolicyFound && !isSafelite && isRecalVehicle) { + await test.step('ProviderPreferencePage >> Select Safelite provider', async () => { + await providerPreferencePage.validateURL(providerPreferencePage.issPageValue); + await providerPreferencePage.scheduleTPAWithAdas(); + }); +} + + if (!isPolicyFound && !(isItac || isNoComp) && !isUnverifiedPolicyAfterVehicleLookup && !isTpaNotEnabledBailout) { + if (isSafelite) { await providerPreferencePage.validateURL(providerPreferencePage.issPageValue); await providerPreferencePage.selectProvider(isSafelite); - - }); + } + + if (!isSafelite && isTpaNotEnabledBailout) { + + await providerPreferencePage.scheduleTPAWithoutAdas(); + + await test.step('validateBailoutDetails >> Bailout code : ' + BailoutCode.TPANotEnabled, async () => { + await bailoutPage.validateURL(bailoutPage.issPageValue); + await bailoutPage.validateBailoutDetails(customerDetails!, BailoutCode.TPANotEnabled); + return; + }); + return; + } + + if (!isSafelite && !isTpaNotEnabledBailout) { + await providerPreferencePage.scheduleTPAWithoutAdas(); + } + } if (isSafelite && isUnverifiedPolicyAfterVehicleLookup) { @@ -752,7 +801,8 @@ async function runWorkflow(page: Page, testCase: TestCase) { await providerPreferencePage.scheduleTPAWithoutAdas(); }); } - // If No-Comp or ITAC, ProviderPreferencePage does not appear +} + if (!isPolicyFound || !(isItac || isNoComp) || isUnverifiedPolicyAfterVehicleLookup) { @@ -766,6 +816,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { }); return; } + if (isTpaNotEnabledBailout) { await test.step('validateBailoutDetails >> Bailout code : ' + BailoutCode.TPANotEnabled, async () => { await bailoutPage.validateURL(bailoutPage.issPageValue); @@ -775,6 +826,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { return; } + if (!isSafelite && !isTpaNotEnabledBailout) { await test.step('TpaSearchPage >> TPA Search', async () => { await tpaSearchPage.validateURL(tpaSearchPage.issPageValue); await tpaSearchPage.selectFirstLocation(); @@ -783,11 +835,8 @@ async function runWorkflow(page: Page, testCase: TestCase) { await test.step('TpaSubmitPage >> TPA Submit', async () => { await tpaSubmitPage.validateURL(tpaSubmitPage.issPageValue); - if (!isUnverifiedPolicyAfterVehicleLookup) { - await tpaSubmitPage.validateDeductible(claimDetails!); - } else { + await tpaSubmitPage.validateDeductible(claimDetails!, isUnverifiedPolicyAfterVehicleLookup!, isPolicyFound!); await tpaSubmitPage.nextPage(); - } }); await test.step('TpaConfirmationPage >> TPA Confirmation', async () => { @@ -797,6 +846,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { }); return; }} + } await test.step('SchedulePage >> Select day and time', async () => { await schedulePage.validateURL(schedulePage.issPageValue); From c7ea26475d38ef6ebc7d5c4d6153e1d2319d0a42 Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Tue, 31 Mar 2026 10:24:27 -0400 Subject: [PATCH 10/37] Update docker file for playwright --- Dockerfile.playwright | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile.playwright b/Dockerfile.playwright index 46a2114a..e9dcce23 100644 --- a/Dockerfile.playwright +++ b/Dockerfile.playwright @@ -11,6 +11,11 @@ COPY package*.json ./ # Install dependencies RUN npm install +# Copy playwright-tests package files + authenticated .npmrc, then install +COPY playwright-tests/package*.json ./playwright-tests/ +COPY playwright-tests/.npmrc ./playwright-tests/ +RUN cd playwright-tests && npm install + # Install Playwright browsers RUN npx playwright install chromium --with-deps From d1d924c4f3c6c7c3adcc44450449b83eadedf207 Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Tue, 31 Mar 2026 12:00:13 -0400 Subject: [PATCH 11/37] Add essentials tag to tests --- playwright-tests/tests/0002_EssentialRepairInShopAcura.ts | 2 +- playwright-tests/tests/0005_EssentialReplaceDynamicAdas.ts | 2 +- playwright-tests/tests/0007_EssentialRepairHyundaiMobile.ts | 2 +- playwright-tests/tests/0010_EssentialVehicleNotFoundBailout.ts | 2 +- playwright-tests/tests/0012_EssentialUniqueGlass.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/playwright-tests/tests/0002_EssentialRepairInShopAcura.ts b/playwright-tests/tests/0002_EssentialRepairInShopAcura.ts index a255853d..82702b83 100644 --- a/playwright-tests/tests/0002_EssentialRepairInShopAcura.ts +++ b/playwright-tests/tests/0002_EssentialRepairInShopAcura.ts @@ -61,7 +61,7 @@ for (const client of essentialClients) { data.isAuthenticationRequired = client.clientFlags.isAuthenticationEnabled ?? false const tc = new TestCase({ name: `0002 Essential Repair Mobile Client: "${client.accountName}"`, - tags: [`@${client.clientTag}`, `@${client.accountName}`], + tags: [`@${client.clientTag}`, `@${client.accountName}`,'@Essentials'], testData: data }, undefined, '0002'); essentialRepairInShopAcuraTests.push(tc); diff --git a/playwright-tests/tests/0005_EssentialReplaceDynamicAdas.ts b/playwright-tests/tests/0005_EssentialReplaceDynamicAdas.ts index 8f22d591..ca3cdac9 100644 --- a/playwright-tests/tests/0005_EssentialReplaceDynamicAdas.ts +++ b/playwright-tests/tests/0005_EssentialReplaceDynamicAdas.ts @@ -69,7 +69,7 @@ for (const client of essentialClients) { data.isAuthenticationRequired = client.clientFlags.isAuthenticationEnabled ?? false const tc = new TestCase({ name: `0005 Essential Replace Dynamic ADAS Client: "${client.accountName}"`, - tags: [`@${client.clientTag}`, `@${client.accountName}`], + tags: [`@${client.clientTag}`, `@${client.accountName}`,'@Essentials'], testData: data }, undefined, '0005'); essentialReplaceDynamicAdasTests.push(tc); diff --git a/playwright-tests/tests/0007_EssentialRepairHyundaiMobile.ts b/playwright-tests/tests/0007_EssentialRepairHyundaiMobile.ts index c4fff62b..da4b9c04 100644 --- a/playwright-tests/tests/0007_EssentialRepairHyundaiMobile.ts +++ b/playwright-tests/tests/0007_EssentialRepairHyundaiMobile.ts @@ -68,7 +68,7 @@ for (const client of essentialClients) { data.isAuthenticationRequired = client.clientFlags.isAuthenticationEnabled ?? false const tc = new TestCase({ name: `0007 Essential Repair Hyundai Mobile Client: "${client.accountName}"`, - tags: [`@${client.clientTag}`, `@${client.accountName}`], + tags: [`@${client.clientTag}`, `@${client.accountName}`,'@Essentials'], testData: data }, undefined, '0007'); essentialRepairMobileHyundaiTests.push(tc); diff --git a/playwright-tests/tests/0010_EssentialVehicleNotFoundBailout.ts b/playwright-tests/tests/0010_EssentialVehicleNotFoundBailout.ts index a604a635..7b009118 100644 --- a/playwright-tests/tests/0010_EssentialVehicleNotFoundBailout.ts +++ b/playwright-tests/tests/0010_EssentialVehicleNotFoundBailout.ts @@ -74,7 +74,7 @@ for (const client of essentialClients) { data.isAuthenticationRequired = client.clientFlags.isAuthenticationEnabled ?? false const tc = new TestCase({ name: `0010 Essential Vehicle Not Found Bailout Client: "${client.accountName}"`, - tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Bailout', '@VehicleNotFound'], + tags: [`@${client.clientTag}`, `@${client.accountName}`,'@Essentials', '@Bailout', '@VehicleNotFound'], testData: data }, undefined, '0001'); essentialVehicleNotFoundTestCases.push(tc); diff --git a/playwright-tests/tests/0012_EssentialUniqueGlass.ts b/playwright-tests/tests/0012_EssentialUniqueGlass.ts index 3f79e9ab..bff695b5 100644 --- a/playwright-tests/tests/0012_EssentialUniqueGlass.ts +++ b/playwright-tests/tests/0012_EssentialUniqueGlass.ts @@ -74,7 +74,7 @@ for (const client of essentialClients) { data.isAuthenticationRequired = client.clientFlags.isAuthenticationEnabled ?? false const tc = new TestCase({ name: `0012 Essential Unique Glass Client: "${client.accountName}"`, - tags: [`@${client.clientTag}`, `@${client.accountName}`], + tags: [`@${client.clientTag}`, `@${client.accountName}`,'@Essentials'], testData: data }, undefined, '0012'); essentialUniqueGlassTests.push(tc); From bb56843114fa4191244c99831552c6fbf0dc08c6 Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Tue, 31 Mar 2026 14:36:28 -0400 Subject: [PATCH 12/37] Change flow to select no for sms opt in --- playwright-tests/pages/PaymentMethodPage.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/playwright-tests/pages/PaymentMethodPage.ts b/playwright-tests/pages/PaymentMethodPage.ts index c715e02f..d7c7ef9c 100644 --- a/playwright-tests/pages/PaymentMethodPage.ts +++ b/playwright-tests/pages/PaymentMethodPage.ts @@ -35,7 +35,7 @@ export class PaymentMethodPage extends BasePage { this.payAtAppointmentButton = this.page.locator('[buttonlabel="Pay at my appointment"]'); this.textReminderYesButton = this.page.locator('div.button-content', { hasText: /^yes$/i }); - this.textReminderNoButton = this.page.locator('div.button-content', { hasText: 'No' }); + this.textReminderNoButton = this.page.locator('div.button-content', { hasText: /^no$/i }); this.continueToCheckoutButton = this.page.getByRole('button', { name: 'Continue to checkout' }); this.submitButton = this.page.getByRole('button', { name: 'Submit' }); } @@ -46,20 +46,20 @@ export class PaymentMethodPage extends BasePage { switch (paymentDetails.paymentType) { case PaymentType.Credit: await this.payNowButton.click(); - await this.textReminderYesButton.click(); + await this.textReminderNoButton.click(); await this.continueToCheckoutButton.click(); await this.selectCreditCard(paymentDetails); break; case PaymentType.Paypal: await this.payNowButton.click(); - await this.textReminderYesButton.click(); + await this.textReminderNoButton.click(); await this.continueToCheckoutButton.click(); await this.selectPaypal(); await this.paypalPage.completePaypalPurchase(paymentDetails); break; case PaymentType.AfterPay: await this.payInFourButton.click(); - await this.textReminderYesButton.click(); + await this.textReminderNoButton.click(); await this.continueToCheckoutButton.click(); // Capture popup @@ -72,7 +72,7 @@ export class PaymentMethodPage extends BasePage { case PaymentType.PayAtService: await this.payAtAppointmentButton.click(); - await this.textReminderYesButton.click(); + await this.textReminderNoButton.click(); await this.submitButton.click(); break; default: @@ -94,7 +94,7 @@ export class PaymentMethodPage extends BasePage { } async submitOrderWithoutPIA() { - await this.textReminderYesButton.click(); + await this.textReminderNoButton.click(); await this.submitButton.click(); } } \ No newline at end of file From a8937d53f0d08ed4a515540a7f8c3da5c5e007bc Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Tue, 31 Mar 2026 16:07:28 -0400 Subject: [PATCH 13/37] Fix Paypal login flakiness --- playwright-tests/pages/PaypalPage.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/playwright-tests/pages/PaypalPage.ts b/playwright-tests/pages/PaypalPage.ts index d1c30c6c..05178dd9 100644 --- a/playwright-tests/pages/PaypalPage.ts +++ b/playwright-tests/pages/PaypalPage.ts @@ -24,9 +24,14 @@ export class PaypalPage extends BasePage { } async completePaypalPurchase(paymentDetails: IPaymentDetails) { - await this.usernameTextBox.fill(paymentDetails.username!); - await this.nextButton.waitFor({ state: 'visible', timeout: 10000 }); - await this.nextButton.click(); + + await expect(async () => { + await this.usernameTextBox.fill(paymentDetails.username!); + await this.nextButton.waitFor({ state: 'visible', timeout: 5000 }); + await this.nextButton.click(); + await expect(this.passwordTextBox).toBeVisible({ timeout: 5000 }); + }).toPass({ timeout: 30000 }); + await this.passwordTextBox.fill(paymentDetails.password!); await this.paypalLoginButton.click(); await this.payButton.click(); From 6be3e3cddec86053010124ccf4aa1d4912c2e284 Mon Sep 17 00:00:00 2001 From: JennyNou Date: Wed, 1 Apr 2026 08:24:41 -0400 Subject: [PATCH 14/37] Fix data for test cases --- playwright-tests/tests/0013_EssentialReplace.ts | 3 ++- playwright-tests/tests/0016_EssentialRepairInShop.ts | 2 +- playwright-tests/tests/0019_EssentialTpaEnabledReplaceRecal.ts | 2 +- playwright-tests/tests/advanced/0002a_ReplaceOemEndorsement.ts | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/playwright-tests/tests/0013_EssentialReplace.ts b/playwright-tests/tests/0013_EssentialReplace.ts index f50889ec..a30ef8ac 100644 --- a/playwright-tests/tests/0013_EssentialReplace.ts +++ b/playwright-tests/tests/0013_EssentialReplace.ts @@ -41,7 +41,8 @@ const essentialReplaceData: Partial = { make: 'Lincoln', model: 'MKZ', style: '4 door sedan', - vehicleLookupType: VehicleLookupType.Address, + vin: '3LNHL2JC4AR755180', + vehicleLookupType: VehicleLookupType.Vin, }, vehicleDamage: [ VehicleDamage.WindshieldCrack, diff --git a/playwright-tests/tests/0016_EssentialRepairInShop.ts b/playwright-tests/tests/0016_EssentialRepairInShop.ts index b98e5c69..27022ac5 100644 --- a/playwright-tests/tests/0016_EssentialRepairInShop.ts +++ b/playwright-tests/tests/0016_EssentialRepairInShop.ts @@ -23,7 +23,7 @@ const essentialHappyPathData: Partial = { 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: '6400 Emerald Parkway', + street: '9799 Heartland Court', city: 'Dublin', state: 'OHIO', postalCode: '43016', diff --git a/playwright-tests/tests/0019_EssentialTpaEnabledReplaceRecal.ts b/playwright-tests/tests/0019_EssentialTpaEnabledReplaceRecal.ts index 37fbdddc..1d02ffb1 100644 --- a/playwright-tests/tests/0019_EssentialTpaEnabledReplaceRecal.ts +++ b/playwright-tests/tests/0019_EssentialTpaEnabledReplaceRecal.ts @@ -30,7 +30,7 @@ const essentialTpaEnabledData: Partial = { // phoneNumber: faker.phone.toString(), notes: 'Automated Test', address: { - street: '1st St S', + street: '1st St', city: 'Jacksonville Beach', state: 'FLORIDA', postalCode: '32250', diff --git a/playwright-tests/tests/advanced/0002a_ReplaceOemEndorsement.ts b/playwright-tests/tests/advanced/0002a_ReplaceOemEndorsement.ts index 56d2f722..07adbdf3 100644 --- a/playwright-tests/tests/advanced/0002a_ReplaceOemEndorsement.ts +++ b/playwright-tests/tests/advanced/0002a_ReplaceOemEndorsement.ts @@ -75,7 +75,7 @@ const advancedScenario0002Data: Partial = { // } ], isSafelite: true, - servicePackage: faker.helpers.enumValue(ServicePackage), + servicePackage: ServicePackage.Premium, customerDetails: customerDetails, claimDetails: { policyNumber: policyNumber, From 4991cfa13b6ad4e0c75b24e0c67e7f3c3a85e86a Mon Sep 17 00:00:00 2001 From: JennyNou Date: Wed, 1 Apr 2026 08:54:55 -0400 Subject: [PATCH 15/37] Remove price service bailout --- playwright-tests/tests/0000__M.test.ts | 26 +++--- .../0021_EssentialPriceServiceErrorBailout.ts | 82 ------------------- 2 files changed, 12 insertions(+), 96 deletions(-) delete mode 100644 playwright-tests/tests/0021_EssentialPriceServiceErrorBailout.ts diff --git a/playwright-tests/tests/0000__M.test.ts b/playwright-tests/tests/0000__M.test.ts index c7b2c5c0..2acfa71b 100644 --- a/playwright-tests/tests/0000__M.test.ts +++ b/playwright-tests/tests/0000__M.test.ts @@ -25,7 +25,6 @@ import advancedScenario0003TestCases from "./advanced/0003a_MobileAfterpay"; import essentialReplaceDynamicAdasTests from "./0005_EssentialReplaceDynamicAdas"; import essentialReplaceStaticAdasTests from "./0001_EssentialReplaceStatisAdas"; import essentialVehicleLookupBailoutTests from "./0020_EssentialVehicleLookupBailout"; -import essentialPriceServiceErrorBailoutTests from "./0021_EssentialPriceServiceErrorBailout"; import essentialServiceableBigTruckTestCases from "./0022_EssentialServiceableBigTruck"; import essentialNonServiceableBigTruckTestCases from "./0023_EssentialNonServiceableBigTruck"; import essentialNonServiceableBigTruckVinTestCases from "./0024_EssentialNonServiceableBigTruckVin"; @@ -87,7 +86,6 @@ test.describe.parallel('ISS QA Automation Regression', () => { addSmokeTagToRandomTest(essentialTpaEnabledReplace_0018); addSmokeTagToRandomTest(essentialTpaEnabledReplaceRecal_0019); addSmokeTagToRandomTest(essentialVehicleLookupBailoutTests); - addSmokeTagToRandomTest(essentialPriceServiceErrorBailoutTests); addSmokeTagToRandomTest(essentialServiceableBigTruckTestCases); addSmokeTagToRandomTest(essentialNonServiceableBigTruckTestCases); addSmokeTagToRandomTest(essentialNonServiceableBigTruckVinTestCases); @@ -166,9 +164,9 @@ test.describe.parallel('ISS QA Automation Regression', () => { test(...prepareTest(testCase, run, options, ruleEngine)); //skipping this until SSR-2004 is fixed } //Scenario 21 - for (const testCase of essentialPriceServiceErrorBailoutTests) { - test(...prepareTest(testCase, run, options, ruleEngine)); - } + //for (const testCase of essentialPriceServiceErrorBailoutTests) { + // test(...prepareTest(testCase, run, options, ruleEngine)); + //} //Scenario 22 for (const testCase of essentialServiceableBigTruckTestCases) { test(...prepareTest(testCase, run, options, ruleEngine)); @@ -595,6 +593,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { if (Array.isArray(vehicleDetails?.address)) { await addressLookupPage.validateURL(addressLookupPage.issPageValue); await addressLookupPage.validateAddressLookupAlerts(vehicleDetails?.address!); + await addressLookupPage.nextPage(); } }); @@ -660,7 +659,6 @@ async function runWorkflow(page: Page, testCase: TestCase) { } if (partQuestions && partQuestions.length > 0) { - let partQuestionsPage = testCase.pages.partQuestionsPage; await partQuestionsPage.validateURL(partQuestionsPage.issPageValue); await partQuestionsPage.validatePartQuestions(partQuestions); await partQuestionsPage.selectPartQuestionResponses(partQuestions); @@ -741,15 +739,15 @@ async function runWorkflow(page: Page, testCase: TestCase) { if (hasStateLawPopup) { await test.step('ProviderPreferencePage >> Dismiss state law popup', async () => { await providerPreferencePage.validateURL(providerPreferencePage.issPageValue); - if (vehicleDamage!.includes(VehicleDamage.WindshieldCrack)) { - await providerPreferencePage.stateLawModalOkayButton.click(); - } else { - await providerPreferencePage.stateLawModalOkayButton.click(); - } - }); + + await expect(async () => { + await providerPreferencePage.stateLawModalOkayButton.waitFor({ state: 'visible' }); + await providerPreferencePage.stateLawModalOkayButton.click(); + }).toPass({ timeout: 30000 }); + }); } - if (isPolicyFound && isSafelite) { + if (isPolicyFound && isSafelite && !isUnverifiedPolicyAfterVehicleLookup) { await test.step('ProviderPreferencePage >> Select Safelite provider', async () => { await providerPreferencePage.validateURL(providerPreferencePage.issPageValue); await providerPreferencePage.selectProvider(isSafelite); @@ -787,7 +785,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { } - if (isSafelite && isUnverifiedPolicyAfterVehicleLookup) { + if (isSafelite && isPolicyFound && isUnverifiedPolicyAfterVehicleLookup) { await test.step('ProviderPreferencePage >> Select Provider ' + isSafelite ? "Safelite" : "Other shops(Non-Safelite)", async () => { await providerPreferencePage.validateURL(providerPreferencePage.issPageValue); await providerPreferencePage.selectProvider(isSafelite); diff --git a/playwright-tests/tests/0021_EssentialPriceServiceErrorBailout.ts b/playwright-tests/tests/0021_EssentialPriceServiceErrorBailout.ts deleted file mode 100644 index a0c4e08a..00000000 --- a/playwright-tests/tests/0021_EssentialPriceServiceErrorBailout.ts +++ /dev/null @@ -1,82 +0,0 @@ -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 { ITestData } from "@business-logic/types/ITestData" -import { faker } from "@faker-js/faker"; -import { getNextWeekday } from "@impl/utils/DateUtils"; - -const nextWeekday = getNextWeekday(); - -const essentialPriceServiceErrorBailoutData: Partial = { - clientTag: 'ALL_ESSENTIAL', - isDuplicateClaim: false, - isPolicyFound: false, - endorsements: [], - isReplace: false, - partQuestions: undefined, - isSafelite: true, - bailoutFlags: { - isPriceServiceErrorBailout: true - }, - servicePackage: faker.helpers.enumValue(ServicePackage), - 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: '9799 Heartland Court', - city: 'Dublin', - state: 'OHIO', - postalCode: '43016', - 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: '2015', - make: 'Honda', - model: 'Accord', - style: '4 door sedan', // TODO: Check correctness of vehicle style - vehicleLookupType: VehicleLookupType.Vin, - vin: '1HGCR2E30FA099831' - }, - vehicleDamage: [ - // VehicleDamage.WindshieldThreeChips, - VehicleDamage.WindshieldCrack, - // VehicleDamage.DriverFrontDoor, - // VehicleDamage.DriverQuarterPanel, - // VehicleDamage.DriverRearDoor, - // VehicleDamage.PassengerFrontDoor, - // VehicleDamage.PassengerQuarterPanel, - // VehicleDamage.PassengerRearDoor, - // VehicleDamage.RearWindow - ], - appointmentDetails: { - serviceLocation: ServiceLocation.InShop, - appointmentDate: nextWeekday - } - -} - -const essentialClients = ClientData.getEssentialClients(); -const essentialPriceServiceErrorBailoutTests: TestCase[] = []; -for (const client of essentialClients) { - const data = {...essentialPriceServiceErrorBailoutData}; - data.clientTag = client.clientTag; - data.isAuthenticationRequired = client.clientFlags.isAuthenticationEnabled ?? false - const tc = new TestCase({ - name: `0021 Essential Price Service Error Bailout Client: "${client.accountName}"`, - tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Bailout', '@PriceService', '@Essentials'], - testData: data - }, undefined, '0021'); - essentialPriceServiceErrorBailoutTests.push(tc); -} - -export default essentialPriceServiceErrorBailoutTests; \ No newline at end of file From 36233faf93ee44cb51680488484429cd6b7e1299 Mon Sep 17 00:00:00 2001 From: JennyNou Date: Wed, 1 Apr 2026 10:27:45 -0400 Subject: [PATCH 16/37] Update name for imported test --- playwright-tests/tests/0000__M.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright-tests/tests/0000__M.test.ts b/playwright-tests/tests/0000__M.test.ts index 2acfa71b..e6df273d 100644 --- a/playwright-tests/tests/0000__M.test.ts +++ b/playwright-tests/tests/0000__M.test.ts @@ -53,7 +53,7 @@ import advancedScenario0021TestCases from "./advanced/0021a_VehicleByPlate"; import advancedScenario0022TestCases from "./advanced/0022a_VehicleByVIN"; import advancedScenario0023TestCases from "./advanced/0023a_VehicleByVINPartsQns"; import { createAccessibilityHtmlReport } from "@impl/utils/ReportUtils"; -import advancedScenario0024TestCases from "./advanced/0024a_VehicleByVINUnverifiedBailout"; +import advancedScenario0024TestCases from "./advanced/0024a_AddressVehicle"; import advancedScenario0025TestCases from "./advanced/0025a_VehicleByVINUnverifiedBailout"; import advancedScenario0026aTestCases from "./advanced/0026a_NoDeductibleAdasBailout5"; import advancedScenario0028aTestCases from "./advanced/0028a_ItacCancelMyClaim"; From 7af77cae21a90b8a453f23b22e84180f15a89556 Mon Sep 17 00:00:00 2001 From: JennyNou Date: Wed, 1 Apr 2026 10:30:52 -0400 Subject: [PATCH 17/37] Add test scenario for when client uses address vehicle --- .../business-logic/types/CustomerDetails.ts | 6 ++ .../business-logic/types/ITestData.ts | 6 +- .../business-logic/types/ITestPages.ts | 4 +- .../business-logic/types/TestCase.ts | 6 +- playwright-tests/pages/AddressVehiclesPage.ts | 21 +++++ .../pages/OrderConfirmationPage.ts | 14 ++- .../tests/advanced/0024a_AddressVehicle.ts | 94 +++++++++++++++++++ 7 files changed, 141 insertions(+), 10 deletions(-) create mode 100644 playwright-tests/pages/AddressVehiclesPage.ts create mode 100644 playwright-tests/tests/advanced/0024a_AddressVehicle.ts diff --git a/playwright-tests/business-logic/types/CustomerDetails.ts b/playwright-tests/business-logic/types/CustomerDetails.ts index 9a4abd95..1020694f 100644 --- a/playwright-tests/business-logic/types/CustomerDetails.ts +++ b/playwright-tests/business-logic/types/CustomerDetails.ts @@ -37,6 +37,12 @@ export interface IVehicleDetails { vehicleLookupType?: VehicleLookupType, } +export interface IAddressVehicleDetails { + year: string, + make: string, + model: string, +} + export interface IAppointmentDetails { serviceLocation: ServiceLocation, appointmentDate?: Date, diff --git a/playwright-tests/business-logic/types/ITestData.ts b/playwright-tests/business-logic/types/ITestData.ts index 3d350351..d3a19d34 100644 --- a/playwright-tests/business-logic/types/ITestData.ts +++ b/playwright-tests/business-logic/types/ITestData.ts @@ -1,5 +1,5 @@ import { ServicePackage, VehicleDamage } from "./Enums" -import { IAppointmentDetails, IClaimDetails, ICustomerDetails, IEndorsementDetails, IPartQuestion, IPaymentDetails, IVehicleDetails } from "./CustomerDetails" +import { IAppointmentDetails, IClaimDetails, ICustomerDetails, IEndorsementDetails, IPartQuestion, IPaymentDetails, IVehicleDetails, IAddressVehicleDetails } from "./CustomerDetails" import IBailoutFlags from "./IBailoutFlags" export interface ITestData { @@ -8,7 +8,8 @@ export interface ITestData { isDuplicateClaim: boolean, isPolicyFound: boolean, // Effective difference between advanced and essential isUnverifiedPolicyAfterVehicleLookup: boolean, // Changing license plate can cause flow to change to unverified from verified - isUseVehicleOnPolicy: boolean, // Should we use the vehicle on the policy? + isUseVehicleOnPolicy: boolean, + isUseVehicleFromAddressLookup: boolean, // Should we use the vehicle from the address lookup? isVehicleLookupValidations: boolean, // Should we validate vehicle lookup? isAddressLookupValidations: boolean, // Should we validate address lookup errors? isVehicleSelectBailout: boolean, // Should we bailout on vehicle lookup? @@ -29,6 +30,7 @@ export interface ITestData { customerDetails: ICustomerDetails, claimDetails: IClaimDetails, vehicleDetails: IVehicleDetails, + addressVehicleDetails: IAddressVehicleDetails, editVehicleDetails: IVehicleDetails, // Vehicle details entered after clicking "Edit vehicle" on Vehicle Details page otherVehiclesOnPolicy: IVehicleDetails[], // IF defined, we validate that the vehicles are present. vehicleDamage: VehicleDamage[], // Array of vehicle damage diff --git a/playwright-tests/business-logic/types/ITestPages.ts b/playwright-tests/business-logic/types/ITestPages.ts index 77ed4e54..87868718 100644 --- a/playwright-tests/business-logic/types/ITestPages.ts +++ b/playwright-tests/business-logic/types/ITestPages.ts @@ -1,4 +1,5 @@ import { AddressLookupPage } from "../../pages/AddressLookupPage"; +import { AddressVehiclesPage } from "../../pages/AddressVehiclesPage"; import { BailoutPage } from "../../pages/BailoutPage"; import CapabilityQuestionsPage from "../../pages/CapabilityQuestionsPage"; import { ContactConfirmationPage } from "../../pages/ContactConfirmationPage"; @@ -31,6 +32,8 @@ import { VinLookupPage } from "../../pages/VinLookupPage"; import { WelcomePage } from "../../pages/WelcomePage"; export default interface ITestPages { + addressLookupPage: AddressLookupPage, + addressVehiclesPage: AddressVehiclesPage, bailoutPage: BailoutPage, capabilityQuestionsPage: CapabilityQuestionsPage, contactConfirmationPage: ContactConfirmationPage, @@ -61,5 +64,4 @@ export default interface ITestPages { vehicleLookupLicensePage: VehicleLookupLicensePage, welcomePage: WelcomePage, moldingQuestionsPage: MoldingQuestionsPage, - addressLookupPage: AddressLookupPage, } \ No newline at end of file diff --git a/playwright-tests/business-logic/types/TestCase.ts b/playwright-tests/business-logic/types/TestCase.ts index ffc332d5..2cd1bb5a 100644 --- a/playwright-tests/business-logic/types/TestCase.ts +++ b/playwright-tests/business-logic/types/TestCase.ts @@ -45,6 +45,7 @@ import VehiclePartQuestionsPage from "../../pages/VehiclePartsPage"; import CapabilityQuestionsPage from "../../pages/CapabilityQuestionsPage"; import { MoldingQuestionsPage } from "../../pages/MoldingQuestionsPage"; import { AddressLookupPage } from "../../pages/AddressLookupPage"; +import { AddressVehiclesPage } from "../../pages/AddressVehiclesPage"; export default class TestCase extends DisposableBase implements ITestCase { public static FrameworkConfig: FrameworkConfig = { @@ -177,6 +178,8 @@ export default class TestCase extends DisposableBase implements ITestCase { public setupPages(page: Page): void { this.pages = { + addressLookupPage: new AddressLookupPage(page), + addressVehiclesPage: new AddressVehiclesPage(page), bailoutPage: new BailoutPage(page), capabilityQuestionsPage: new CapabilityQuestionsPage(page), contactConfirmationPage: new ContactConfirmationPage(page), @@ -206,8 +209,7 @@ export default class TestCase extends DisposableBase implements ITestCase { vehicleLookupAddressPage: new VehicleLookupAddressPage(page), vehicleLookupLicensePage: new VehicleLookupLicensePage(page), welcomePage: new WelcomePage(page), - moldingQuestionsPage: new MoldingQuestionsPage(page), - addressLookupPage: new AddressLookupPage(page) + moldingQuestionsPage: new MoldingQuestionsPage(page) }; } diff --git a/playwright-tests/pages/AddressVehiclesPage.ts b/playwright-tests/pages/AddressVehiclesPage.ts new file mode 100644 index 00000000..de4bc527 --- /dev/null +++ b/playwright-tests/pages/AddressVehiclesPage.ts @@ -0,0 +1,21 @@ +import { expect, type Locator, type Page } from '@playwright/test'; +import { BasePage } from './BasePage'; +import { IAddressVehicleDetails } from '@business-logic/types/CustomerDetails'; + +export class AddressVehiclesPage extends BasePage { + + readonly page: Page; + readonly selectVehicleButton: Locator; + issPageValue = 'address-vehicles'; + + constructor(page: Page) { + super(page); + this.page = page; + this.selectVehicleButton = this.page.getByRole('radio').first(); + } + + async selectVehicle(addressVehicleDetails: IAddressVehicleDetails){ + const vehicleRegExp = new RegExp(`${addressVehicleDetails.year} .+ ${addressVehicleDetails.model}`, 'i'); + await this.page.locator('label').filter({hasText: vehicleRegExp}).locator('div').click(); + } +} \ No newline at end of file diff --git a/playwright-tests/pages/OrderConfirmationPage.ts b/playwright-tests/pages/OrderConfirmationPage.ts index 6e957c54..7ec6b4a0 100644 --- a/playwright-tests/pages/OrderConfirmationPage.ts +++ b/playwright-tests/pages/OrderConfirmationPage.ts @@ -1,6 +1,6 @@ import test, { expect, type Locator, type Page } from '@playwright/test'; import { BasePage } from './BasePage'; -import { ICustomerDetails, IVehicleDetails } from '@business-logic/types/CustomerDetails'; +import { ICustomerDetails, IVehicleDetails, IAddressVehicleDetails } from '@business-logic/types/CustomerDetails'; import { PaymentType, ServicePackage } from '@business-logic/types/Enums'; import { ITestData } from '@business-logic/types/ITestData'; @@ -50,8 +50,8 @@ export class OrderConfirmationPage extends BasePage { async validateOrderConfirmationPage(testData: Partial) { // Destructure data we use - const { vehicleDetails, customerDetails, servicePackage, isItac, - isNoComp, isPolicyFound, claimDetails, paymentDetails, isUseVehicleOnPolicy } = testData; + const { vehicleDetails, servicePackage, isItac, + isNoComp, isPolicyFound, claimDetails, paymentDetails, isUseVehicleFromAddressLookup, addressVehicleDetails } = testData; // Grab text @@ -62,7 +62,7 @@ export class OrderConfirmationPage extends BasePage { // Derived conditions const isItacOrNoComp = !!(isItac || isNoComp); - const isUnverified = !isPolicyFound && claimDetails!.policyDeductible === -1; + const isUnverified = !isPolicyFound || claimDetails!.policyDeductible === -1; const isUnverifiedPolicyAfterVehicleLookup = testData.isUnverifiedPolicyAfterVehicleLookup === true; const hasPremiumOrStandard = (claimDetails!.policyDeductible >= 0 || !isPolicyFound) && @@ -93,7 +93,11 @@ export class OrderConfirmationPage extends BasePage { expect.soft(this.serviceText).toBeVisible();; expect.soft(this.successHeader).toBeVisible(); expect.soft(confirmationTextValue).toContain('Your appointment is on Safelite\'s schedule and your confirmation email is on the way.'); - expect.soft(serviceTextValue).toContain(`${vehicleDetails!.year} ${vehicleDetails!.make} ${vehicleDetails!.model}`); + if (isUseVehicleFromAddressLookup) { + expect.soft(serviceTextValue).toContain(`${addressVehicleDetails!.year} ${addressVehicleDetails!.make} ${addressVehicleDetails!.model}`); + } else { + expect.soft(serviceTextValue).toContain(`${vehicleDetails!.year} ${vehicleDetails!.make} ${vehicleDetails!.model}`); + } // Validate order number and appointment type header await this.validateOrderNumber(); diff --git a/playwright-tests/tests/advanced/0024a_AddressVehicle.ts b/playwright-tests/tests/advanced/0024a_AddressVehicle.ts new file mode 100644 index 00000000..5d0c1581 --- /dev/null +++ b/playwright-tests/tests/advanced/0024a_AddressVehicle.ts @@ -0,0 +1,94 @@ +import ClientData from "@business-logic/data/ClientData"; +import TestCase from "@business-logic/types/TestCase"; +import { DamageType, PartQuestionType, PaymentType, 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"; +import MockPolicyData from "@business-logic/data/MockPolicyData"; +import { ICustomerDetails } from "@business-logic/types/CustomerDetails"; + +const nextWeekday = getNextWeekday(); +const customerDetails: ICustomerDetails = { + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + email: 'itqatest@safelite.com', + phoneNumber: '614-531-0031', + notes: 'Automated Test', + address: { + street: '4530 Kenny Road', + city: 'Columbus', + state: 'OH', + postalCode: '43220', + country: 'United States' + } +} + +const policyNumber = `~AutomatedScenario0024a${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('0024a', customerDetails, policyNumber); + +const advancedScenario0024Data: Partial = { + clientTag: '', + isDuplicateClaim: false, + isPolicyFound: false, + isNoComp: false, + hasStateLawPopup: false, + endorsements: undefined, + isUseVehicleOnPolicy: false, + isUseVehicleFromAddressLookup: true, + isVehicleLookupValidations: false, + isVehicleSelectBailout: false, + isAddressLookupValidations: true, + isMoldingQuestion: false, + isSafelite: true, + servicePackage: faker.helpers.enumValue(ServicePackage), + customerDetails: customerDetails, + claimDetails: { + policyNumber: policyNumber, + policyDeductible: -1, + damageDate: '2017-06-02', + damageCause: DamageType.Vandalism + }, + policySoap: policySoap, + vehicleDetails: { + year: '2015', + make: 'Audi', + model: 'A7', + style: '4 door hatchback', + vehicleLookupType: VehicleLookupType.Address, + address: [ + { street: '9 Test Street', city: 'Columbus', state: 'OH', postalCode: '43220', lastName: 'Test' }, + { street: '8621 GREENLEAF AVE', city: 'Whittier', state: 'California', postalCode: '90602', lastName: 'Johnson' }, + { street: '6531 CANYON RANCH', city: 'Frisco', state: 'Texas', postalCode: '75036', lastName: 'TRAINOR' } + ], + }, + addressVehicleDetails: { + year: '2020', + make: 'Audi', + model: 'A6', + }, + vehicleDamage: [ + VehicleDamage.WindshieldCrack, + ], + appointmentDetails: { + serviceLocation: ServiceLocation.InShop, + shopAddress: undefined, + appointmentDate: nextWeekday + }, + +} + +// TODO: Add validation for deductible/covered amount +const advancedClients = ClientData.getAdvancedClients(); +const advancedScenario0024TestCases: TestCase[] = []; +for (const client of advancedClients) { + const data = { ...advancedScenario0024Data }; + data.clientTag = client.clientTag; + const tc = new TestCase({ + name: `0024a Advanced Client Address Vehicle Lookup: "${client.accountName}"`, + tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@INSR-2057'], + testData: data + }, undefined, '0024a'); + advancedScenario0024TestCases.push(tc); +} + +export default advancedScenario0024TestCases; \ No newline at end of file From f83eb5728cb9ff88b2a83c774ceddbd59ded7831 Mon Sep 17 00:00:00 2001 From: JennyNou Date: Wed, 1 Apr 2026 10:32:11 -0400 Subject: [PATCH 18/37] Update test with new test name and scenario --- .../0024a_VehicleByVINUnverifiedBailout.ts | 88 ------------------- 1 file changed, 88 deletions(-) delete mode 100644 playwright-tests/tests/advanced/0024a_VehicleByVINUnverifiedBailout.ts diff --git a/playwright-tests/tests/advanced/0024a_VehicleByVINUnverifiedBailout.ts b/playwright-tests/tests/advanced/0024a_VehicleByVINUnverifiedBailout.ts deleted file mode 100644 index 26f1daa8..00000000 --- a/playwright-tests/tests/advanced/0024a_VehicleByVINUnverifiedBailout.ts +++ /dev/null @@ -1,88 +0,0 @@ -import ClientData from "@business-logic/data/ClientData"; -import TestCase from "@business-logic/types/TestCase"; -import { DamageType, PartQuestionType, PaymentType, 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"; -import MockPolicyData from "@business-logic/data/MockPolicyData"; -import { ICustomerDetails } from "@business-logic/types/CustomerDetails"; - -const nextWeekday = getNextWeekday(); -const customerDetails: ICustomerDetails = { - firstName: faker.person.firstName(), - lastName: faker.person.lastName(), - email: 'itqatest@safelite.com', - phoneNumber: '614-531-0031', - notes: 'Automated Test', - address: { - street: faker.location.streetAddress(), - city: 'Columbus', - state: 'OH', - postalCode: '43220', - country: 'United States' - } -} - -const policyNumber = `~AutomatedScenario0024a${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('0024a', customerDetails, policyNumber); - -const advancedScenario0024Data: Partial = { - clientTag: '', - isDuplicateClaim: false, - isPolicyFound: false, - isNoComp: false, - hasStateLawPopup: false, - endorsements: undefined, - isUseVehicleOnPolicy: false, - isVehicleLookupValidations: false, - isVehicleSelectBailout: false, - isAddressLookupValidations: true, - isMoldingQuestion: false, - isSafelite: true, - servicePackage: faker.helpers.enumValue(ServicePackage), - customerDetails: customerDetails, - claimDetails: { - policyNumber: policyNumber, - policyDeductible: 0.00, - damageDate: '2017-06-02', - damageCause: DamageType.Vandalism - }, - policySoap: policySoap, - vehicleDetails: { - year: '2015', - make: 'Audi', - model: 'A7', - style: '4 door hatchback', - vehicleLookupType: VehicleLookupType.Address, - address: [ - { street: '9 Test Street', city: 'Columbus', state: 'OH', postalCode: '43220', lastName: 'Test' }, - { street: '8621 GREENLEAF AVE', city: 'Whittier', state: 'California', postalCode: '90602', lastName: 'Johnson' }, - { street: '6531 CANYON RANCH', city: 'Frisco', state: 'Texas', postalCode: '75036', lastName: 'TRAINOR' } - ], - }, - vehicleDamage: [ - VehicleDamage.WindshieldCrack, - ], - appointmentDetails: { - serviceLocation: ServiceLocation.InShop, - shopAddress: undefined, - appointmentDate: nextWeekday - }, - -} - -// TODO: Add validation for deductible/covered amount -const advancedClients = ClientData.getAdvancedClients(); -const advancedScenario0024TestCases: TestCase[] = []; -for (const client of advancedClients) { - const data = { ...advancedScenario0024Data }; - data.clientTag = client.clientTag; - const tc = new TestCase({ - name: `0024a Advanced client Unlisted Vehicle Bailout: "${client.accountName}"`, - tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@INSR-2057'], - testData: data - }, undefined, '0024a'); - advancedScenario0024TestCases.push(tc); -} - -export default advancedScenario0024TestCases; \ No newline at end of file From 5dfaf0afb6caff2ae7a15c124728d41856a42cc2 Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Wed, 1 Apr 2026 14:42:38 -0400 Subject: [PATCH 19/37] Update to reference playwright template --- azure-pipelines.yml | 183 ++++---------------------------------------- 1 file changed, 13 insertions(+), 170 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f21dde96..7f03c7ba 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,17 +28,11 @@ resources: type: github name: Safelite/AzureDevOps endpoint: Safelite - ref: refs/tags/t5.5.40 + ref: refs/tags/t5.7.40 variables: - group: Digital-Infrastructure - group: ISS-BuildBranches - - name: dockerImageName - value: 'playwright-tests' - - name: imageTag - value: '$(Build.BuildId)' - - name: totalShards - value: 2 - name: IS_REGRESSION value: 'false' @@ -54,170 +48,19 @@ stages: npmLocation: $(Build.SourcesDirectory) testResultsFile: junit.xml summaryFileLocation: $(Build.SourcesDirectory)/coverage/cobertura-coverage.xml - - job: playwright_tests - continueOnError: true - strategy: - matrix: - shard1: - shardNumber: 1 - shard2: - shardNumber: 2 - # shard3: - # shardNumber: 3 - # shard4: - # shardNumber: 4 - - steps: - - task: Docker@2 - displayName: 'Build Docker Image' - inputs: - command: build - dockerfile: Dockerfile.playwright - repository: $(dockerImageName) - tags: $(imageTag) - arguments: '--no-cache --pull' - - - script: | - branch_name=$(System.PullRequest.SourceBranch) - echo "Retrieved branch name: '$branch_name'" - JIRA_CARD_NUMBER="${branch_name##*/}" - echo "Extracted JIRA Card number: '$JIRA_CARD_NUMBER'" - # Create container and run tests - container_id=$(docker create \ - --ipc=host \ - -e CCIS_API_AUTH=$(CCIS_API_AUTH) \ - -e BASE_URL=$(BASE_URL) \ - -e CCIS_API_URL=$(CCIS_API_URL) \ - -e ADMIN_SERVICE_API_URL=$(ADMIN_SERVICE_API_URL) \ - -e SHARD=$(shardNumber) \ - -e CI=true \ - -e ENABLE_MOCK_TESTING=true \ - -e ENABLE_ACCESSIBILITY_TESTING=true \ - -e NODE_ENV=$(NODE_ENV) \ - $(dockerImageName):$(imageTag) \ - npx concurrently -k -n "server,playwright"\ - "sed -i \"s|^process\.env\.VUE_APP_CONSUMER_CF_DISTRO = .*|process\.env\.VUE_APP_CONSUMER_CF_DISTRO='https://digitalapi.test.safelite.io'|\" \"./vue.config.js\" && echo \"Updated config file to use TEST APIs\" && npm run serve -- --port=8080"\ - "npx wait-on http://localhost:8080 && npm run test:playwright -- --shard=$(shardNumber)/$(totalShards) --reporter=list,blob --grep \"@$JIRA_CARD_NUMBER\"") - - # Start container and stream logs - echo "Starting tests for shard $(shardNumber)..." - docker start -a $container_id - - # Create directory for test results - echo "Creating test results directory..." - mkdir -p $(System.DefaultWorkingDirectory)/blob-reports/shard-$(shardNumber) - - # Copy test results from container - echo "Copying test results..." - docker cp $container_id:/app/blob-report/. $(System.DefaultWorkingDirectory)/blob-reports/shard-$(shardNumber)/ - - # Remove container - echo "Cleaning up container..." - docker rm $container_id - - # Check if tests failed - if [ $? -ne 0 ]; then - echo "Tests failed in shard $(shardNumber) or tests don't exist for this shard number!" - exit 0 # Suppress error. It will be visible in report. - fi - displayName: 'Run Playwright Tests - Shard $(shardNumber)' - - - task: PublishPipelineArtifact@1 - displayName: 'Publish Test Reports - Shard $(shardNumber)' - condition: always() - inputs: - targetPath: '$(System.DefaultWorkingDirectory)/blob-reports/shard-$(shardNumber)' - artifact: 'playwright-report-shard-$(shardNumber)' - publishLocation: 'pipeline' - - - script: | - docker rmi $(dockerImageName):$(imageTag) -f - displayName: 'Cleanup Docker Image' - condition: always() - - - job: download_and_merge_reports - dependsOn: playwright_tests - timeoutInMinutes: 10 - cancelTimeoutInMinutes: 10 - steps: - - task: DownloadPipelineArtifact@2 - inputs: - targetPath: '$(System.DefaultWorkingDirectory)/playwright-reports' - - task: Docker@2 - displayName: 'Build Docker Image' - inputs: - command: build - dockerfile: Dockerfile.playwright - repository: $(dockerImageName) - tags: $(imageTag) - arguments: '--no-cache --pull' - - bash: | - branch_name=$(System.PullRequest.SourceBranch) - echo "Retrieved branch name: '$branch_name'" - JIRA_CARD_NUMBER="${branch_name##*/}" - echo "Extracted JIRA Card number: '$JIRA_CARD_NUMBER'" - # Create container for jira writeback - container_id=$(docker create \ - --ipc=host \ - -e JIRA_SERVER=$(JIRA_SERVER) \ - -e JIRA_USERNAME=$(JIRA_USERNAME) \ - -e JIRA_API_KEY=$(JIRA_API_KEY) \ - -e IS_REGRESSION=$(IS_REGRESSION) \ - -e JIRA_CARD_NUMBER="$JIRA_CARD_NUMBER" \ - $(dockerImageName):$(imageTag) \ - bash -c "echo \"Moving Playwright reports out of subfolders...\" && - find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \; && - echo \"Merging reports...\" && - export NODE_OPTIONS=--max_old_space_size=4096 - PLAYWRIGHT_JUNIT_OUTPUT_DIR='/app/test-results' PLAYWRIGHT_JUNIT_OUTPUT_NAME='junit_results.xml' npx playwright merge-reports --reporter=junit,\"/app/playwright-tests/impl/reporter/JiraWritebackReporter.ts\" ./playwright-reports - echo \"Contents of ortoni-report:\" && ls ./ortoni-report && - echo 'Current dir: ' && pwd - echo 'Contents of current dir: ' && ls - echo 'Contents of /app/test-results' && ls /app/test-results ") - - # Start container and stream logs - echo "Starting merge" - docker start -a $container_id - - # Create directory for test results - echo "Creating test results directory..." - mkdir -p $(System.DefaultWorkingDirectory)/ortoni-report - mkdir -p $(System.DefaultWorkingDirectory)/test-results - - # Copy test results from container - echo "Copying test results..." - docker cp $container_id:/app/ortoni-report/. $(System.DefaultWorkingDirectory)/ortoni-report - docker cp $container_id:/app/test-results/junit_results.xml $(System.DefaultWorkingDirectory)/test-results - - # Remove container - echo "Cleaning up container..." - docker rm $container_id - env: + - template: templates/digital/playwright-test.yml@AzureDevOps + parameters: + applicationType: 'vue' + totalShards: 2 + targetUrl: $(BASE_URL) + dockerFileName: 'Dockerfile.playwright' + isRegression: false + filterTags: '' + playwrightTestsPath: 'playwright-tests' + npmServePath: '.' + npmrcPath: 'playwright-tests/.npmrc' + secrets: JIRA_API_KEY: $(JIRA_API_KEY) - displayName: merge_and_publish_results_to_jira - - - task: PublishTestResults@2 - displayName: 'Publish test results' - inputs: - searchFolder: 'test-results' - testResultsFormat: 'JUnit' - testResultsFiles: 'junit_results.xml' - mergeTestResults: true - failTaskOnFailedTests: false - testRunTitle: 'Playwright Tests' - condition: succeededOrFailed() - - - task: PublishPipelineArtifact@1 - displayName: 'Publish Merged Report' - condition: always() - inputs: - targetPath: '$(System.DefaultWorkingDirectory)/ortoni-report' - artifact: 'playwright-merged-report' - publishLocation: 'pipeline' - - script: | - docker rmi $(dockerImageName):$(imageTag) -f - displayName: 'Cleanup Docker Image' - condition: always() - ${{ else }}: # Dev Build/Deploy From 9d4454dcb6858908cf9b1629246daa60ac445df7 Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Wed, 1 Apr 2026 15:38:37 -0400 Subject: [PATCH 20/37] Change tag to run all Liberty Mutual tests in regression pipeline --- azure-pipelines-automated-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index d232fac9..df7663f6 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -46,7 +46,7 @@ stages: targetUrl: $(BASE_URL) dockerFileName: 'Dockerfile.playwright' isRegression: ${{ variables.IS_REGRESSION }} - filterTags: '@Advanced' + filterTags: 'Liberty Mutual' playwrightTestsPath: 'playwright-tests' npmServePath: '.' npmrcPath: 'playwright-tests/.npmrc' From 61beab1d9a44baa18a11478dfba8570a179b04f3 Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Wed, 1 Apr 2026 16:27:03 -0400 Subject: [PATCH 21/37] Test commit with tagged test --- playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts b/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts index 1351e326..9ffaf3f4 100644 --- a/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts +++ b/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts @@ -70,7 +70,7 @@ for (const client of advancedClients) { data.clientTag = client.clientTag; const tc = new TestCase({ name: `0001a_Advanced_Replace_Deductible_Client: "${client.accountName}"`, - tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], + tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', 'INSR-6847'], testData: data }, undefined, '0001a'); advancedScenario0001TestCases.push(tc); From 62e304f7c6f10311fd7260831e61d75e0a59f29e Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Wed, 1 Apr 2026 16:32:56 -0400 Subject: [PATCH 22/37] Fix tag to filter test --- playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts b/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts index 9ffaf3f4..0a7c5d4d 100644 --- a/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts +++ b/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts @@ -70,7 +70,7 @@ for (const client of advancedClients) { data.clientTag = client.clientTag; const tc = new TestCase({ name: `0001a_Advanced_Replace_Deductible_Client: "${client.accountName}"`, - tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', 'INSR-6847'], + tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@INSR-6847'], testData: data }, undefined, '0001a'); advancedScenario0001TestCases.push(tc); From aa37535a4cc3e9c95f7d68231d8bd698921bda14 Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Wed, 1 Apr 2026 17:16:34 -0400 Subject: [PATCH 23/37] Update template tag --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7f03c7ba..67729ffb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,7 +28,7 @@ resources: type: github name: Safelite/AzureDevOps endpoint: Safelite - ref: refs/tags/t5.7.40 + ref: refs/tags/t5.7.53 variables: - group: Digital-Infrastructure From 0dfae8795eb642ef98e412a666d52ead197ff29b Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Wed, 1 Apr 2026 17:16:49 -0400 Subject: [PATCH 24/37] Remove jira card tag --- playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts b/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts index 0a7c5d4d..1351e326 100644 --- a/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts +++ b/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts @@ -70,7 +70,7 @@ for (const client of advancedClients) { data.clientTag = client.clientTag; const tc = new TestCase({ name: `0001a_Advanced_Replace_Deductible_Client: "${client.accountName}"`, - tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@INSR-6847'], + tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], testData: data }, undefined, '0001a'); advancedScenario0001TestCases.push(tc); From b247926d80b6548ddc2cd267e68234b7a1aa854f Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Wed, 1 Apr 2026 17:18:10 -0400 Subject: [PATCH 25/37] Add tag to retest PR pipeline --- playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts b/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts index 1351e326..0a7c5d4d 100644 --- a/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts +++ b/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts @@ -70,7 +70,7 @@ for (const client of advancedClients) { data.clientTag = client.clientTag; const tc = new TestCase({ name: `0001a_Advanced_Replace_Deductible_Client: "${client.accountName}"`, - tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], + tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@INSR-6847'], testData: data }, undefined, '0001a'); advancedScenario0001TestCases.push(tc); From e898095acfcf92510d20371d9655852f43c23faf Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Wed, 1 Apr 2026 17:30:50 -0400 Subject: [PATCH 26/37] Add step in docker file for token --- Dockerfile.playwright | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile.playwright b/Dockerfile.playwright index e9dcce23..d74d866a 100644 --- a/Dockerfile.playwright +++ b/Dockerfile.playwright @@ -5,6 +5,9 @@ FROM mcr.microsoft.com/playwright:v1.48.0-noble # Set the working directory in the container WORKDIR /app +# Accept GitHub token as a build argument +ARG GITHUB_TOKEN + # Copy package.json and package-lock.json COPY package*.json ./ @@ -14,7 +17,8 @@ RUN npm install # Copy playwright-tests package files + authenticated .npmrc, then install COPY playwright-tests/package*.json ./playwright-tests/ COPY playwright-tests/.npmrc ./playwright-tests/ -RUN cd playwright-tests && npm install +RUN --mount=type=secret,id=GITHUB_TOKEN \ + cd playwright-tests && GITHUB_TOKEN=$(cat /run/secrets/GITHUB_TOKEN) npm install # Install Playwright browsers RUN npx playwright install chromium --with-deps From 9d89412b5810afa04395e07a84d1862714e7e4bc Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Wed, 1 Apr 2026 17:31:39 -0400 Subject: [PATCH 27/37] Remove tag to test --- playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts b/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts index 0a7c5d4d..1351e326 100644 --- a/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts +++ b/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts @@ -70,7 +70,7 @@ for (const client of advancedClients) { data.clientTag = client.clientTag; const tc = new TestCase({ name: `0001a_Advanced_Replace_Deductible_Client: "${client.accountName}"`, - tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@INSR-6847'], + tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], testData: data }, undefined, '0001a'); advancedScenario0001TestCases.push(tc); From 7080305976786ccb1067b1d1e35614639aa4ce40 Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Wed, 1 Apr 2026 17:32:21 -0400 Subject: [PATCH 28/37] Add tagged test back in to confirm pipeline is working --- playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts b/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts index 1351e326..0a7c5d4d 100644 --- a/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts +++ b/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts @@ -70,7 +70,7 @@ for (const client of advancedClients) { data.clientTag = client.clientTag; const tc = new TestCase({ name: `0001a_Advanced_Replace_Deductible_Client: "${client.accountName}"`, - tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], + tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@INSR-6847'], testData: data }, undefined, '0001a'); advancedScenario0001TestCases.push(tc); From e68a7e2ad6838bfdaab7ef3d2dce55e6610c854b Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Wed, 1 Apr 2026 17:44:04 -0400 Subject: [PATCH 29/37] Revert docker file changes that did not fix authentication error --- Dockerfile.playwright | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Dockerfile.playwright b/Dockerfile.playwright index d74d866a..e9dcce23 100644 --- a/Dockerfile.playwright +++ b/Dockerfile.playwright @@ -5,9 +5,6 @@ FROM mcr.microsoft.com/playwright:v1.48.0-noble # Set the working directory in the container WORKDIR /app -# Accept GitHub token as a build argument -ARG GITHUB_TOKEN - # Copy package.json and package-lock.json COPY package*.json ./ @@ -17,8 +14,7 @@ RUN npm install # Copy playwright-tests package files + authenticated .npmrc, then install COPY playwright-tests/package*.json ./playwright-tests/ COPY playwright-tests/.npmrc ./playwright-tests/ -RUN --mount=type=secret,id=GITHUB_TOKEN \ - cd playwright-tests && GITHUB_TOKEN=$(cat /run/secrets/GITHUB_TOKEN) npm install +RUN cd playwright-tests && npm install # Install Playwright browsers RUN npx playwright install chromium --with-deps From 7ac982426f915f3d57468040cf4415f8a2a16b93 Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Wed, 1 Apr 2026 17:44:27 -0400 Subject: [PATCH 30/37] Remove test tag --- playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts b/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts index 0a7c5d4d..1351e326 100644 --- a/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts +++ b/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts @@ -70,7 +70,7 @@ for (const client of advancedClients) { data.clientTag = client.clientTag; const tc = new TestCase({ name: `0001a_Advanced_Replace_Deductible_Client: "${client.accountName}"`, - tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@INSR-6847'], + tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], testData: data }, undefined, '0001a'); advancedScenario0001TestCases.push(tc); From 2f26fb3443cbe2f22c91bfce06ea02f523e1d026 Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Wed, 1 Apr 2026 17:45:55 -0400 Subject: [PATCH 31/37] Add variable group and ccis to secrets --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 67729ffb..9f677925 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -33,6 +33,7 @@ resources: variables: - group: Digital-Infrastructure - group: ISS-BuildBranches + - group: SafelitePlaywright - name: IS_REGRESSION value: 'false' @@ -60,6 +61,7 @@ stages: npmServePath: '.' npmrcPath: 'playwright-tests/.npmrc' secrets: + CCIS_API_AUTH: $(CCIS_API_AUTH) JIRA_API_KEY: $(JIRA_API_KEY) - ${{ else }}: From be4af17e48351ad631a80951b982941f11212170 Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Wed, 1 Apr 2026 17:46:16 -0400 Subject: [PATCH 32/37] Add tagged test to run PR gate to test --- playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts b/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts index 1351e326..0a7c5d4d 100644 --- a/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts +++ b/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts @@ -70,7 +70,7 @@ for (const client of advancedClients) { data.clientTag = client.clientTag; const tc = new TestCase({ name: `0001a_Advanced_Replace_Deductible_Client: "${client.accountName}"`, - tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], + tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced', '@INSR-6847'], testData: data }, undefined, '0001a'); advancedScenario0001TestCases.push(tc); From 9c391239b418f06f4d67e368234962dfe12655bb Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Fri, 3 Apr 2026 12:09:38 -0400 Subject: [PATCH 33/37] Remove mock api responses to fix updated test --- playwright-tests/tests/mockResponses/mockResponsesConfig.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/playwright-tests/tests/mockResponses/mockResponsesConfig.json b/playwright-tests/tests/mockResponses/mockResponsesConfig.json index a5061acc..2e703f7a 100644 --- a/playwright-tests/tests/mockResponses/mockResponsesConfig.json +++ b/playwright-tests/tests/mockResponses/mockResponsesConfig.json @@ -17,8 +17,6 @@ "coverage/api/v1/coverage/register-claim": "0002a_Advanced_Replace_Deductible_Client/coverage/api/v1/coverage/register-claim.json", "price/api/v1/price/order-items-with-itac-pricing": "0002a_Advanced_Replace_Deductible_Client/price/api/v1/price/order-items-with-itac-pricing.json", "location/api/v1/location/providers/75023/Replace/100/550036/true/CR00056707/DW01571GTNNOEM": "0002a_Advanced_Replace_Deductible_Client/location/api/v1/location/providers/75023/Replace/100/550036/true/CR00056707/DW01571GTNNOEM.json", - "location/api/v1/location/alert-reasons/01813": "0002a_Advanced_Replace_Deductible_Client/location/api/v1/location/alert-reasons/01813.json", - "parts/api/v1/parts/rain-repel": "0002a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/rain-repel.json", - "price/api/v1/price/combined-quote": "0002a_Advanced_Replace_Deductible_Client/price/api/v1/price/combined-quote.json" + "location/api/v1/location/alert-reasons/01813": "0002a_Advanced_Replace_Deductible_Client/location/api/v1/location/alert-reasons/01813.json" } } \ No newline at end of file From 4b67276abb243cc9ea6f41451e775064a265907f Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Fri, 3 Apr 2026 12:10:28 -0400 Subject: [PATCH 34/37] Update locator for TPA flow to work --- playwright-tests/pages/TpaSearchPage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright-tests/pages/TpaSearchPage.ts b/playwright-tests/pages/TpaSearchPage.ts index 0919f2d8..cdf359e6 100644 --- a/playwright-tests/pages/TpaSearchPage.ts +++ b/playwright-tests/pages/TpaSearchPage.ts @@ -9,7 +9,7 @@ export class TpaSearchPage extends BasePage { constructor(page: Page) { super(page); this.page = page; - this.firstLocationButton = page.locator('div.button-content').first(); + this.firstLocationButton = page.locator('div.button-content').filter({ hasNotText: /safelite/i }).first(); } async selectFirstLocation() { From beae88ebf2fe4a0531e1e776bcbbbf8ca0ed309b Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Fri, 3 Apr 2026 12:11:07 -0400 Subject: [PATCH 35/37] Increase timeout for less flakiness in test runs --- playwright-tests/pages/BasePage.ts | 2 +- playwright-tests/pages/PolicyHolderDetailsPage.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/playwright-tests/pages/BasePage.ts b/playwright-tests/pages/BasePage.ts index 1c8ba1da..bf950f07 100644 --- a/playwright-tests/pages/BasePage.ts +++ b/playwright-tests/pages/BasePage.ts @@ -132,6 +132,6 @@ export class BasePage { await expect(async () => { const currentUrl = this.page.url(); expect(currentUrl).not.toEqual(startingUrl); - }).toPass({ timeout: 60_000 }); + }).toPass({ timeout: 70_000 }); } } \ No newline at end of file diff --git a/playwright-tests/pages/PolicyHolderDetailsPage.ts b/playwright-tests/pages/PolicyHolderDetailsPage.ts index 0acde323..2cca536a 100644 --- a/playwright-tests/pages/PolicyHolderDetailsPage.ts +++ b/playwright-tests/pages/PolicyHolderDetailsPage.ts @@ -48,7 +48,7 @@ export class PolicyHolderDetailsPage extends BasePage { await this.addressInputBox.fill(customerDetails.address.street); // Wait for suggestions to load (Google Places has a slight delay) - await this.page.locator('.pac-item').first().waitFor({ state: 'visible', timeout: 5000 }); + await this.page.locator('.pac-item').first().waitFor({ state: 'visible', timeout: 6000 }); // Click the first result await this.page.locator('.pac-item').first().click(); From 484077fa2f37fc515138704bce6e5a782692ad8a Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Fri, 3 Apr 2026 12:11:46 -0400 Subject: [PATCH 36/37] Clean up comment and step --- playwright-tests/tests/0000__M.test.ts | 28 ++++++++------------------ 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/playwright-tests/tests/0000__M.test.ts b/playwright-tests/tests/0000__M.test.ts index e6df273d..b7c69e7d 100644 --- a/playwright-tests/tests/0000__M.test.ts +++ b/playwright-tests/tests/0000__M.test.ts @@ -163,11 +163,7 @@ test.describe.parallel('ISS QA Automation Regression', () => { for (const testCase of essentialVehicleLookupBailoutTests) { test(...prepareTest(testCase, run, options, ruleEngine)); //skipping this until SSR-2004 is fixed } - //Scenario 21 - //for (const testCase of essentialPriceServiceErrorBailoutTests) { - // test(...prepareTest(testCase, run, options, ruleEngine)); - //} - //Scenario 22 + // Scenario 22 for (const testCase of essentialServiceableBigTruckTestCases) { test(...prepareTest(testCase, run, options, ruleEngine)); } @@ -696,8 +692,13 @@ async function runWorkflow(page: Page, testCase: TestCase) { if (hasOemEndorsement) { await coverageStatementPage.validateOEMBullet(); } + + if (isUseVehicleFromAddressLookup) { + await coverageStatementPage.handleUnverifiedPolicyAfterVehicleLookupFlow(); + } + // For essential/unverified flows - if (!isPolicyFound) { + if (!isPolicyFound && !isUseVehicleFromAddressLookup) { await coverageStatementPage.handleUnverifiedFlow(claimDetails!); } @@ -726,10 +727,6 @@ async function runWorkflow(page: Page, testCase: TestCase) { await coverageStatementPage.handleUnverifiedPolicyAfterVehicleLookupFlow(); } - if (isUseVehicleFromAddressLookup) { - await coverageStatementPage.handleUnverifiedPolicyAfterVehicleLookupFlow(); - } - }); @@ -800,20 +797,11 @@ async function runWorkflow(page: Page, testCase: TestCase) { }); } } - +// TPA Flow if (!isPolicyFound || !(isItac || isNoComp) || isUnverifiedPolicyAfterVehicleLookup) { if (!isSafelite) { - if (testCase.testData!.clientTag == '05CC1609-3631-4044-B45A-E78E13343B9A') { // Avoiding TPA flow for Federated Insureance due to Defect# SSR-1984 //Temporary fix until Defect# SSR-1984 is addressed. - await test.step('***** Performing Safelite flow for Federal Insurance due to defec# SSR-1984 *****', async () => { }); - await test.step('TpaSearchPage >> TPA Search', async () => { - await tpaSearchPage.validateURL(tpaSearchPage.issPageValue); - await tpaSearchPage.selectFirstLocation(); - // await tpaSearchPage.nextPage(); - }); - return; - } if (isTpaNotEnabledBailout) { await test.step('validateBailoutDetails >> Bailout code : ' + BailoutCode.TPANotEnabled, async () => { From a1856582f4872b01715e7a4aa42b0211fd63d6b9 Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Fri, 3 Apr 2026 12:13:35 -0400 Subject: [PATCH 37/37] Update tests to use real addresses instead of faker --- .../tests/0005_EssentialReplaceDynamicAdas.ts | 16 ++++++++-------- .../tests/advanced/0003a_MobileAfterpay.ts | 2 +- .../tests/advanced/0022a_VehicleByVIN.ts | 8 +++----- .../tests/advanced/0024a_AddressVehicle.ts | 4 +--- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/playwright-tests/tests/0005_EssentialReplaceDynamicAdas.ts b/playwright-tests/tests/0005_EssentialReplaceDynamicAdas.ts index ca3cdac9..0975925b 100644 --- a/playwright-tests/tests/0005_EssentialReplaceDynamicAdas.ts +++ b/playwright-tests/tests/0005_EssentialReplaceDynamicAdas.ts @@ -23,10 +23,10 @@ const essentialReplaceDynamicAdasData: Partial = { 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: faker.location.streetAddress(), - city: 'Chicago', - state: 'ILLINOIS', - postalCode: '60645', + street: '9039 4th Avenue South', + city: 'Seattle', + state: 'WASHINGTON', + postalCode: '98108', country: 'United States' } }, @@ -50,10 +50,10 @@ const essentialReplaceDynamicAdasData: Partial = { appointmentDetails: { serviceLocation: ServiceLocation.Mobile, serviceAddress: { - street: "2088 Haviland Road, Columbus, OH, USA", - city:"Vermillion", - state: "Ohio", - postalCode: "44089", + street: "9039 4th Avenue South", + city:"Seattle", + state: "WASHINGTON", + postalCode: "98108", country: "undefined" }, appointmentDate: nextWeekday diff --git a/playwright-tests/tests/advanced/0003a_MobileAfterpay.ts b/playwright-tests/tests/advanced/0003a_MobileAfterpay.ts index f205e795..6243fa2e 100644 --- a/playwright-tests/tests/advanced/0003a_MobileAfterpay.ts +++ b/playwright-tests/tests/advanced/0003a_MobileAfterpay.ts @@ -55,7 +55,7 @@ const advancedScenario0003Data: Partial = { policyNumber: policyNumber, policyDeductible: 50, damageDate: '2026-01-02', - damageCause: faker.helpers.enumValue(DamageType) + damageCause: DamageType.Rock }, policySoap: policySoap, vehicleDetails: { diff --git a/playwright-tests/tests/advanced/0022a_VehicleByVIN.ts b/playwright-tests/tests/advanced/0022a_VehicleByVIN.ts index dffddf16..671c69de 100644 --- a/playwright-tests/tests/advanced/0022a_VehicleByVIN.ts +++ b/playwright-tests/tests/advanced/0022a_VehicleByVIN.ts @@ -15,10 +15,10 @@ const customerDetails: ICustomerDetails = { phoneNumber: '614-531-0031', notes: 'Automated Test', address: { - street: faker.location.streetAddress(), + street: '950 Rincon Circle', city: 'San Jose', state: 'CA', - postalCode: '97230-6373', + postalCode: '97230', country: 'United States' } } @@ -36,9 +36,7 @@ const advancedScenario0022Data: Partial = { endorsements: undefined, isUseVehicleOnPolicy: false, isVehicleLookupValidations: true, - vehiclePartQuestions: [ - - ], + vehiclePartQuestions: [], isSafelite: false, servicePackage: faker.helpers.enumValue(ServicePackage), customerDetails: customerDetails, diff --git a/playwright-tests/tests/advanced/0024a_AddressVehicle.ts b/playwright-tests/tests/advanced/0024a_AddressVehicle.ts index 5d0c1581..dbfcb8ae 100644 --- a/playwright-tests/tests/advanced/0024a_AddressVehicle.ts +++ b/playwright-tests/tests/advanced/0024a_AddressVehicle.ts @@ -15,7 +15,7 @@ const customerDetails: ICustomerDetails = { phoneNumber: '614-531-0031', notes: 'Automated Test', address: { - street: '4530 Kenny Road', + street: '2682 Lane Road', city: 'Columbus', state: 'OH', postalCode: '43220', @@ -35,8 +35,6 @@ const advancedScenario0024Data: Partial = { endorsements: undefined, isUseVehicleOnPolicy: false, isUseVehicleFromAddressLookup: true, - isVehicleLookupValidations: false, - isVehicleSelectBailout: false, isAddressLookupValidations: true, isMoldingQuestion: false, isSafelite: true,