From e3d237340929c011df6bbc723fa463c242d3b0f3 Mon Sep 17 00:00:00 2001 From: maguire-arman Date: Wed, 18 Jun 2025 10:08:02 -0400 Subject: [PATCH] Sets payment method to self-pay for cash clients Configures test data to explicitly set the payment method to "SelfPay" for test cases involving cash clients. This change ensures that the payment process is correctly initiated and handled when customers choose to pay directly. --- playwright-tests/tests/CashRepairInShopAfterPay.ts | 4 ++++ playwright-tests/tests/CashRepairInShopPayPal.ts | 4 ++++ playwright-tests/tests/CashRepairMobileCreditCard.ts | 4 ++++ playwright-tests/tests/CashReplaceDynamicRecalMobile.ts | 4 ++++ .../tests/CashReplaceGlassAddressLookupInshopAfterPay.ts | 4 ++++ .../tests/CashReplaceGlassLicensePlateLookupInshopPaypal.ts | 4 ++++ playwright-tests/tests/CashReplaceGlassPromoInshop.ts | 4 ++++ playwright-tests/tests/CashReplaceMultiGlassMobile.ts | 4 ++++ playwright-tests/tests/CashReplaceMultiGlassPromoInshop.ts | 4 ++++ playwright-tests/tests/CashReplaceMultiSlidingGlassDropoff.ts | 4 ++++ playwright-tests/tests/CashReplaceRainDefensePromoInshop.ts | 4 ++++ .../tests/CashReplaceSafeliteCanNotRecalMobile.ts | 4 ++++ playwright-tests/tests/CashReplaceVinMobile.ts | 4 ++++ playwright-tests/tests/CashReplaceWiperDropoff.ts | 4 ++++ playwright-tests/tests/CashReplaceWiperPromoInshop.ts | 4 ++++ 15 files changed, 60 insertions(+) diff --git a/playwright-tests/tests/CashRepairInShopAfterPay.ts b/playwright-tests/tests/CashRepairInShopAfterPay.ts index edb811ea5..7a7a577f1 100644 --- a/playwright-tests/tests/CashRepairInShopAfterPay.ts +++ b/playwright-tests/tests/CashRepairInShopAfterPay.ts @@ -4,6 +4,7 @@ import { VehicleDamage, ServiceLocation, ServicePackage } from 'safelite-playwri import { ITestCase } from '../framework/Typedefs' import { ClientData } from 'safelite-playwright-core'; import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core'; +import { PaymentMethod } from 'framework/localTypes/Enums'; // Set the seed before generating any data setFakerSeedFromTestName("CashRepairInShopAfterPay"); @@ -12,6 +13,9 @@ setFakerSeedFromTestName("CashRepairInShopAfterPay"); const cashRepairInShopAfterPayData : Partial = { ...getDefaultTestData(), // Get default data with current seed + // CASH Client + paymentMethod: PaymentMethod.SelfPay, + //Override default vehicle damage (Windshield Crack) vehicleDamage: [VehicleDamage.WindshieldTwoChips], diff --git a/playwright-tests/tests/CashRepairInShopPayPal.ts b/playwright-tests/tests/CashRepairInShopPayPal.ts index 024d79c41..2a36127f4 100644 --- a/playwright-tests/tests/CashRepairInShopPayPal.ts +++ b/playwright-tests/tests/CashRepairInShopPayPal.ts @@ -4,6 +4,7 @@ import { VehicleDamage, ServicePackage } from 'safelite-playwright-core'; import { ITestCase } from '../framework/Typedefs' import { ClientData } from 'safelite-playwright-core'; import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core'; +import { PaymentMethod } from 'framework/localTypes/Enums'; // Set the seed before generating any data setFakerSeedFromTestName("CashRepairInShopPayPal"); @@ -12,6 +13,9 @@ setFakerSeedFromTestName("CashRepairInShopPayPal"); const cashRepairInShopPayPalData : Partial = { ...getDefaultTestData(), // Get default data with current seed + // CASH Client + paymentMethod: PaymentMethod.SelfPay, + //Override default vehicle damage (Windshield Crack) vehicleDamage: [VehicleDamage.WindshieldThreeChips], diff --git a/playwright-tests/tests/CashRepairMobileCreditCard.ts b/playwright-tests/tests/CashRepairMobileCreditCard.ts index c11771ea3..b776f7fa5 100644 --- a/playwright-tests/tests/CashRepairMobileCreditCard.ts +++ b/playwright-tests/tests/CashRepairMobileCreditCard.ts @@ -4,6 +4,7 @@ import { VehicleDamage, ServiceLocation } from 'safelite-playwright-core'; import { ITestCase } from '../framework/Typedefs' import { ClientData } from 'safelite-playwright-core'; import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core'; +import { PaymentMethod } from 'framework/localTypes/Enums'; // Set the seed before generating any data setFakerSeedFromTestName("CashRepairMobileCreditCard"); @@ -12,6 +13,9 @@ setFakerSeedFromTestName("CashRepairMobileCreditCard"); const cashRepairMobileCCData : Partial = { ...getDefaultTestData(), // Get default data with current seed + // CASH Client + paymentMethod: PaymentMethod.SelfPay, + // Override default vehicle damage (Windshield Crack) vehicleDamage: [VehicleDamage.WindshieldOneChip], diff --git a/playwright-tests/tests/CashReplaceDynamicRecalMobile.ts b/playwright-tests/tests/CashReplaceDynamicRecalMobile.ts index 1818343d1..7b16f582b 100644 --- a/playwright-tests/tests/CashReplaceDynamicRecalMobile.ts +++ b/playwright-tests/tests/CashReplaceDynamicRecalMobile.ts @@ -4,6 +4,7 @@ import { ServiceLocation, PaymentType } from 'safelite-playwright-core'; import { ITestCase } from '../framework/Typedefs' import { VehicleLookupType } from 'safelite-playwright-core'; import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core'; +import { PaymentMethod } from 'framework/localTypes/Enums'; // Set the seed before generating any data setFakerSeedFromTestName("CashReplaceDynamicRecalMobile"); @@ -11,6 +12,9 @@ setFakerSeedFromTestName("CashReplaceDynamicRecalMobile"); // Now get the test data with the seeded faker const cashReplaceDynamicRecalMobileData: Partial = { ...getDefaultTestData(), // Get default data with current seed + + // CASH Client + paymentMethod: PaymentMethod.SelfPay, // Flag for recalibration vehicle isRecalVehicle: true, diff --git a/playwright-tests/tests/CashReplaceGlassAddressLookupInshopAfterPay.ts b/playwright-tests/tests/CashReplaceGlassAddressLookupInshopAfterPay.ts index 2c34b313f..cfc273c1b 100644 --- a/playwright-tests/tests/CashReplaceGlassAddressLookupInshopAfterPay.ts +++ b/playwright-tests/tests/CashReplaceGlassAddressLookupInshopAfterPay.ts @@ -4,6 +4,7 @@ import { ITestCase } from '../framework/Typedefs' import { VehicleLookupType } from 'safelite-playwright-core'; import { ClientData } from 'safelite-playwright-core'; import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core'; +import { PaymentMethod } from 'framework/localTypes/Enums'; // Set the seed before generating any data setFakerSeedFromTestName("CashReplaceGlassAddressLookupInshopAfterPay"); @@ -11,6 +12,9 @@ setFakerSeedFromTestName("CashReplaceGlassAddressLookupInshopAfterPay"); // Now get the test data with the seeded faker const cashReplaceGlassAddressLookupInshopAfterPayData: Partial = { ...getDefaultTestData(), // Get default data with current seed + + // CASH Client + paymentMethod: PaymentMethod.SelfPay, // Enable entering funnel with ZIP isEnterFunnelWithZip: true, diff --git a/playwright-tests/tests/CashReplaceGlassLicensePlateLookupInshopPaypal.ts b/playwright-tests/tests/CashReplaceGlassLicensePlateLookupInshopPaypal.ts index 4499bb004..defa4b36c 100644 --- a/playwright-tests/tests/CashReplaceGlassLicensePlateLookupInshopPaypal.ts +++ b/playwright-tests/tests/CashReplaceGlassLicensePlateLookupInshopPaypal.ts @@ -4,6 +4,7 @@ import { ITestCase } from '../framework/Typedefs' import { VehicleLookupType } from 'safelite-playwright-core'; import { ClientData } from 'safelite-playwright-core'; import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core'; +import { PaymentMethod } from 'framework/localTypes/Enums'; // Set the seed before generating any data setFakerSeedFromTestName("CashReplaceGlassLicensePlateLookupInshopPaypal"); @@ -11,6 +12,9 @@ setFakerSeedFromTestName("CashReplaceGlassLicensePlateLookupInshopPaypal"); // Now get the test data with the seeded faker const cashReplaceGlassLicensePlateLookupInshopPaypalData: Partial = { ...getDefaultTestData(), // Get default data with current seed + + // CASH Client + paymentMethod: PaymentMethod.SelfPay, // Override customer details - using a different ZIP customerDetails: { diff --git a/playwright-tests/tests/CashReplaceGlassPromoInshop.ts b/playwright-tests/tests/CashReplaceGlassPromoInshop.ts index 0c4e44444..8d3679f1b 100644 --- a/playwright-tests/tests/CashReplaceGlassPromoInshop.ts +++ b/playwright-tests/tests/CashReplaceGlassPromoInshop.ts @@ -4,6 +4,7 @@ import { PaymentType } from 'safelite-playwright-core'; import { ITestCase } from '../framework/Typedefs' import { VehicleLookupType } from 'safelite-playwright-core'; import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core'; +import { PaymentMethod } from 'framework/localTypes/Enums'; // Set the seed before generating any data setFakerSeedFromTestName("CashReplaceGlassPromoInshop"); @@ -11,6 +12,9 @@ setFakerSeedFromTestName("CashReplaceGlassPromoInshop"); // Now get the test data with the seeded faker const cashReplaceGlassPromoInshopData: Partial = { ...getDefaultTestData(), // Get default data with current seed + + // CASH Client + paymentMethod: PaymentMethod.SelfPay, // Flag for recalibration vehicle isRecalVehicle: true, diff --git a/playwright-tests/tests/CashReplaceMultiGlassMobile.ts b/playwright-tests/tests/CashReplaceMultiGlassMobile.ts index 61bb84043..f67f44234 100644 --- a/playwright-tests/tests/CashReplaceMultiGlassMobile.ts +++ b/playwright-tests/tests/CashReplaceMultiGlassMobile.ts @@ -4,6 +4,7 @@ import { VehicleDamage, PartQuestionType, PaymentType, ServicePackage, ServiceLo import { ITestCase } from '../framework/Typedefs' import { VehicleLookupType } from 'safelite-playwright-core'; import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core'; +import { PaymentMethod } from 'framework/localTypes/Enums'; // Set the seed before generating any data setFakerSeedFromTestName("CashReplaceMultiGlassMobile"); @@ -12,6 +13,9 @@ setFakerSeedFromTestName("CashReplaceMultiGlassMobile"); const cashReplaceMultiGlassMobileData: Partial = { ...getDefaultTestData(), // Get default data with current seed + // CASH Client + paymentMethod: PaymentMethod.SelfPay, + customerDetails: { ...getDefaultTestData().customerDetails!, address: { diff --git a/playwright-tests/tests/CashReplaceMultiGlassPromoInshop.ts b/playwright-tests/tests/CashReplaceMultiGlassPromoInshop.ts index 3d51dfbf6..7237bb530 100644 --- a/playwright-tests/tests/CashReplaceMultiGlassPromoInshop.ts +++ b/playwright-tests/tests/CashReplaceMultiGlassPromoInshop.ts @@ -4,6 +4,7 @@ import { VehicleDamage, PartQuestionType, PaymentType } from 'safelite-playwrigh import { ITestCase } from '../framework/Typedefs' import { VehicleLookupType } from 'safelite-playwright-core'; import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core'; +import { PaymentMethod } from 'framework/localTypes/Enums'; // Set the seed before generating any data setFakerSeedFromTestName("CashReplaceMultiGlassPromoInshop"); @@ -11,6 +12,9 @@ setFakerSeedFromTestName("CashReplaceMultiGlassPromoInshop"); // Now get the test data with the seeded faker const cashReplaceMultiGlassPromoInshopData: Partial = { ...getDefaultTestData(), // Get default data with current seed + + // CASH Client + paymentMethod: PaymentMethod.SelfPay, // Flag for recalibration vehicle isRecalVehicle: true, diff --git a/playwright-tests/tests/CashReplaceMultiSlidingGlassDropoff.ts b/playwright-tests/tests/CashReplaceMultiSlidingGlassDropoff.ts index 088ab9991..d2a54d58f 100644 --- a/playwright-tests/tests/CashReplaceMultiSlidingGlassDropoff.ts +++ b/playwright-tests/tests/CashReplaceMultiSlidingGlassDropoff.ts @@ -4,6 +4,7 @@ import { VehicleDamage, PartQuestionType, PaymentType, ServicePackage, ServiceLo import { ITestCase } from '../framework/Typedefs' import { VehicleLookupType } from 'safelite-playwright-core'; import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core'; +import { PaymentMethod } from 'framework/localTypes/Enums'; // Set the seed before generating any data setFakerSeedFromTestName("CashReplaceMultiSlidingGlassDropoff"); @@ -12,6 +13,9 @@ setFakerSeedFromTestName("CashReplaceMultiSlidingGlassDropoff"); const cashReplaceMultiSlidingGlassDropoffData: Partial = { ...getDefaultTestData(), // Get default data with current seed + // CASH Client + paymentMethod: PaymentMethod.SelfPay, + // Override customer postal code customerDetails: { ...getDefaultTestData().customerDetails!, diff --git a/playwright-tests/tests/CashReplaceRainDefensePromoInshop.ts b/playwright-tests/tests/CashReplaceRainDefensePromoInshop.ts index da3dbdc23..d9fbd1a91 100644 --- a/playwright-tests/tests/CashReplaceRainDefensePromoInshop.ts +++ b/playwright-tests/tests/CashReplaceRainDefensePromoInshop.ts @@ -4,6 +4,7 @@ import { ServicePackage, PaymentType } from 'safelite-playwright-core'; import { ITestCase } from '../framework/Typedefs' import { VehicleLookupType } from 'safelite-playwright-core'; import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core'; +import { PaymentMethod } from 'framework/localTypes/Enums'; // Set the seed before generating any data setFakerSeedFromTestName("CashReplaceRainDefensePromoInshop"); @@ -11,6 +12,9 @@ setFakerSeedFromTestName("CashReplaceRainDefensePromoInshop"); // Now get the test data with the seeded faker const cashReplaceRainDefensePromoInshopData: Partial = { ...getDefaultTestData(), // Get default data with current seed + + // CASH Client + paymentMethod: PaymentMethod.SelfPay, // Key feature: Premium package with Rain Defense servicePackage: ServicePackage.Premium, diff --git a/playwright-tests/tests/CashReplaceSafeliteCanNotRecalMobile.ts b/playwright-tests/tests/CashReplaceSafeliteCanNotRecalMobile.ts index 355b726a6..3729ff72b 100644 --- a/playwright-tests/tests/CashReplaceSafeliteCanNotRecalMobile.ts +++ b/playwright-tests/tests/CashReplaceSafeliteCanNotRecalMobile.ts @@ -4,6 +4,7 @@ import { ServiceLocation, PartQuestionType, PaymentType } from 'safelite-playwri import { ITestCase } from '../framework/Typedefs' import { VehicleLookupType } from 'safelite-playwright-core'; import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core'; +import { PaymentMethod } from 'framework/localTypes/Enums'; // Set the seed before generating any data setFakerSeedFromTestName("CashReplaceSafeliteCanNotRecalMobile"); @@ -11,6 +12,9 @@ setFakerSeedFromTestName("CashReplaceSafeliteCanNotRecalMobile"); // Now get the test data with the seeded faker const cashReplaceSafeliteCanNotRecalMobileData: Partial = { ...getDefaultTestData(), // Get default data with current seed + + // CASH Client + paymentMethod: PaymentMethod.SelfPay, // Special flag to skip estimate page isSkipEstimatePage: true, diff --git a/playwright-tests/tests/CashReplaceVinMobile.ts b/playwright-tests/tests/CashReplaceVinMobile.ts index 48b17a39f..d47ab608f 100644 --- a/playwright-tests/tests/CashReplaceVinMobile.ts +++ b/playwright-tests/tests/CashReplaceVinMobile.ts @@ -4,6 +4,7 @@ import { AppointmentTimeslot, ServiceLocation, PaymentType } from 'safelite-play import { ITestCase } from '../framework/Typedefs' import { VehicleLookupType } from 'safelite-playwright-core'; import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core'; +import { PaymentMethod } from 'framework/localTypes/Enums'; // Set the seed based on test name for consistent but unique data setFakerSeedFromTestName("CashReplaceVinMobile"); @@ -11,6 +12,9 @@ setFakerSeedFromTestName("CashReplaceVinMobile"); // Now get the test data with the seeded faker const cashReplaceVinMobileData: Partial = { ...getDefaultTestData(), // Get default data with current seed + + // CASH Client + paymentMethod: PaymentMethod.SelfPay, // Flag for recalibration vehicle isRecalVehicle: true, diff --git a/playwright-tests/tests/CashReplaceWiperDropoff.ts b/playwright-tests/tests/CashReplaceWiperDropoff.ts index 5b79df193..695eaba9a 100644 --- a/playwright-tests/tests/CashReplaceWiperDropoff.ts +++ b/playwright-tests/tests/CashReplaceWiperDropoff.ts @@ -4,6 +4,7 @@ import { ServicePackage, ServiceLocation, PartQuestionType, PaymentType } from ' import { ITestCase } from '../framework/Typedefs' import { VehicleLookupType } from 'safelite-playwright-core'; import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core'; +import { PaymentMethod } from 'framework/localTypes/Enums'; // Set the seed based on test name for consistent but unique data setFakerSeedFromTestName("CashReplaceWiperDropoff"); @@ -11,6 +12,9 @@ setFakerSeedFromTestName("CashReplaceWiperDropoff"); // Now get the test data with the seeded faker const cashReplaceWiperDropoffData: Partial = { ...getDefaultTestData(), // Get default data with current seed + + // CASH Client + paymentMethod: PaymentMethod.SelfPay, // Key feature: Standard package which includes wipers servicePackage: ServicePackage.Standard, diff --git a/playwright-tests/tests/CashReplaceWiperPromoInshop.ts b/playwright-tests/tests/CashReplaceWiperPromoInshop.ts index 635125299..12cbbd6f1 100644 --- a/playwright-tests/tests/CashReplaceWiperPromoInshop.ts +++ b/playwright-tests/tests/CashReplaceWiperPromoInshop.ts @@ -4,6 +4,7 @@ import { ServicePackage, ServiceLocation, PaymentType } from 'safelite-playwrigh import { ITestCase } from '../framework/Typedefs' import { VehicleLookupType } from 'safelite-playwright-core'; import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core'; +import { PaymentMethod } from 'framework/localTypes/Enums'; // Set the seed based on test name for consistent but unique data setFakerSeedFromTestName("CashReplaceWiperPromoInShop"); @@ -11,6 +12,9 @@ setFakerSeedFromTestName("CashReplaceWiperPromoInShop"); // Now get the test data with the seeded faker const cashReplaceWiperPromoInShopData: Partial = { ...getDefaultTestData(), // Get default data with current seed + + // CASH Client + paymentMethod: PaymentMethod.SelfPay, // Key feature: Standard package with wipers servicePackage: ServicePackage.Standard,