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.
This commit is contained in:
parent
626dc854e7
commit
e3d2373409
15 changed files with 60 additions and 0 deletions
|
|
@ -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<ITestData> = {
|
||||
...getDefaultTestData(), // Get default data with current seed
|
||||
|
||||
// CASH Client
|
||||
paymentMethod: PaymentMethod.SelfPay,
|
||||
|
||||
//Override default vehicle damage (Windshield Crack)
|
||||
vehicleDamage: [VehicleDamage.WindshieldTwoChips],
|
||||
|
||||
|
|
|
|||
|
|
@ -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<ITestData> = {
|
||||
...getDefaultTestData(), // Get default data with current seed
|
||||
|
||||
// CASH Client
|
||||
paymentMethod: PaymentMethod.SelfPay,
|
||||
|
||||
//Override default vehicle damage (Windshield Crack)
|
||||
vehicleDamage: [VehicleDamage.WindshieldThreeChips],
|
||||
|
||||
|
|
|
|||
|
|
@ -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<ITestData> = {
|
||||
...getDefaultTestData(), // Get default data with current seed
|
||||
|
||||
// CASH Client
|
||||
paymentMethod: PaymentMethod.SelfPay,
|
||||
|
||||
// Override default vehicle damage (Windshield Crack)
|
||||
vehicleDamage: [VehicleDamage.WindshieldOneChip],
|
||||
|
||||
|
|
|
|||
|
|
@ -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<ITestData> = {
|
||||
...getDefaultTestData(), // Get default data with current seed
|
||||
|
||||
// CASH Client
|
||||
paymentMethod: PaymentMethod.SelfPay,
|
||||
|
||||
// Flag for recalibration vehicle
|
||||
isRecalVehicle: true,
|
||||
|
|
|
|||
|
|
@ -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<ITestData> = {
|
||||
...getDefaultTestData(), // Get default data with current seed
|
||||
|
||||
// CASH Client
|
||||
paymentMethod: PaymentMethod.SelfPay,
|
||||
|
||||
// Enable entering funnel with ZIP
|
||||
isEnterFunnelWithZip: true,
|
||||
|
|
|
|||
|
|
@ -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<ITestData> = {
|
||||
...getDefaultTestData(), // Get default data with current seed
|
||||
|
||||
// CASH Client
|
||||
paymentMethod: PaymentMethod.SelfPay,
|
||||
|
||||
// Override customer details - using a different ZIP
|
||||
customerDetails: {
|
||||
|
|
|
|||
|
|
@ -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<ITestData> = {
|
||||
...getDefaultTestData(), // Get default data with current seed
|
||||
|
||||
// CASH Client
|
||||
paymentMethod: PaymentMethod.SelfPay,
|
||||
|
||||
// Flag for recalibration vehicle
|
||||
isRecalVehicle: true,
|
||||
|
|
|
|||
|
|
@ -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<ITestData> = {
|
||||
...getDefaultTestData(), // Get default data with current seed
|
||||
|
||||
// CASH Client
|
||||
paymentMethod: PaymentMethod.SelfPay,
|
||||
|
||||
customerDetails: {
|
||||
...getDefaultTestData().customerDetails!,
|
||||
address: {
|
||||
|
|
|
|||
|
|
@ -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<ITestData> = {
|
||||
...getDefaultTestData(), // Get default data with current seed
|
||||
|
||||
// CASH Client
|
||||
paymentMethod: PaymentMethod.SelfPay,
|
||||
|
||||
// Flag for recalibration vehicle
|
||||
isRecalVehicle: true,
|
||||
|
|
|
|||
|
|
@ -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<ITestData> = {
|
||||
...getDefaultTestData(), // Get default data with current seed
|
||||
|
||||
// CASH Client
|
||||
paymentMethod: PaymentMethod.SelfPay,
|
||||
|
||||
// Override customer postal code
|
||||
customerDetails: {
|
||||
...getDefaultTestData().customerDetails!,
|
||||
|
|
|
|||
|
|
@ -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<ITestData> = {
|
||||
...getDefaultTestData(), // Get default data with current seed
|
||||
|
||||
// CASH Client
|
||||
paymentMethod: PaymentMethod.SelfPay,
|
||||
|
||||
// Key feature: Premium package with Rain Defense
|
||||
servicePackage: ServicePackage.Premium,
|
||||
|
|
|
|||
|
|
@ -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<ITestData> = {
|
||||
...getDefaultTestData(), // Get default data with current seed
|
||||
|
||||
// CASH Client
|
||||
paymentMethod: PaymentMethod.SelfPay,
|
||||
|
||||
// Special flag to skip estimate page
|
||||
isSkipEstimatePage: true,
|
||||
|
|
|
|||
|
|
@ -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<ITestData> = {
|
||||
...getDefaultTestData(), // Get default data with current seed
|
||||
|
||||
// CASH Client
|
||||
paymentMethod: PaymentMethod.SelfPay,
|
||||
|
||||
// Flag for recalibration vehicle
|
||||
isRecalVehicle: true,
|
||||
|
|
|
|||
|
|
@ -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<ITestData> = {
|
||||
...getDefaultTestData(), // Get default data with current seed
|
||||
|
||||
// CASH Client
|
||||
paymentMethod: PaymentMethod.SelfPay,
|
||||
|
||||
// Key feature: Standard package which includes wipers
|
||||
servicePackage: ServicePackage.Standard,
|
||||
|
|
|
|||
|
|
@ -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<ITestData> = {
|
||||
...getDefaultTestData(), // Get default data with current seed
|
||||
|
||||
// CASH Client
|
||||
paymentMethod: PaymentMethod.SelfPay,
|
||||
|
||||
// Key feature: Standard package with wipers
|
||||
servicePackage: ServicePackage.Standard,
|
||||
|
|
|
|||
Loading…
Reference in a new issue