From 2ebc4b9c770b18cb82698bb589f34abbc5f73a39 Mon Sep 17 00:00:00 2001 From: JennyNou Date: Wed, 15 Apr 2026 08:23:26 -0400 Subject: [PATCH] Add Adyen type --- .../business-logic/types/CustomerDetails.ts | 10 ++++++++++ playwright-tests/business-logic/types/ITestData.ts | 5 +++-- playwright-tests/tests/0000__M.test.ts | 4 ++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/playwright-tests/business-logic/types/CustomerDetails.ts b/playwright-tests/business-logic/types/CustomerDetails.ts index 1020694f..f722565a 100644 --- a/playwright-tests/business-logic/types/CustomerDetails.ts +++ b/playwright-tests/business-logic/types/CustomerDetails.ts @@ -72,6 +72,16 @@ export interface IPaymentDetails { billingAddress?: IAddress, } +export interface IPaymentDetailsAdyen { + paymentType: PaymentType, + username?: string, + password?: string, + cardNumber?: string, + expirationDate?: string, + cvv?: string, + billingAddress?: IAddress, +} + // export interface IVehicleDamage { // isRearWindowDamage?: boolean, // windshieldDamage?: WindshieldDamage, diff --git a/playwright-tests/business-logic/types/ITestData.ts b/playwright-tests/business-logic/types/ITestData.ts index 2214c384..a457644c 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, IAddressVehicleDetails } from "./CustomerDetails" +import { IAppointmentDetails, IClaimDetails, ICustomerDetails, IEndorsementDetails, IPartQuestion, IPaymentDetails, IPaymentDetailsAdyen, IVehicleDetails, IAddressVehicleDetails } from "./CustomerDetails" import IBailoutFlags from "./IBailoutFlags" export interface ITestData { @@ -35,7 +35,8 @@ export interface ITestData { otherVehiclesOnPolicy: IVehicleDetails[], // IF defined, we validate that the vehicles are present. vehicleDamage: VehicleDamage[], // Array of vehicle damage appointmentDetails: IAppointmentDetails, - paymentDetails: IPaymentDetails // Payment information + paymentDetails: IPaymentDetails, // Payment information + paymentDetailsAdyen: IPaymentDetailsAdyen, // Adyen Payment information isRecalNotification: boolean, isRecalWarning: boolean, isRecalVehicle: boolean, diff --git a/playwright-tests/tests/0000__M.test.ts b/playwright-tests/tests/0000__M.test.ts index 96bc1a98..787b5704 100644 --- a/playwright-tests/tests/0000__M.test.ts +++ b/playwright-tests/tests/0000__M.test.ts @@ -375,7 +375,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { // Destructure data for easy access const { customerDetails, claimDetails, vehicleDetails, addressVehicleDetails, vehicleDamage, appointmentDetails, isSafelite, endorsements, - partQuestions, paymentDetails, isNoComp, isItac, isRecalNotification, isUnverifiedPolicyAfterVehicleLookup, + partQuestions, paymentDetails, paymentDetailsAdyen, isNoComp, isItac, isRecalNotification, isUnverifiedPolicyAfterVehicleLookup, isRecalWarning, servicePackage, hasOemEndorsement, hasStateLawPopup, otherVehiclesOnPolicy, isUseVehicleFromAddressLookup, isSeparateApptsWarning, vehiclePartQuestions, editVehicleDetails, isAddressLookupValidations, hasMilitaryWarning, capabilityQuestions, isUseVehicleOnPolicy, @@ -879,7 +879,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { if (isPolicyFound && (isUseVehicleOnPolicy ?? true) && claimDetails!.policyDeductible > 0) { await test.step('PaymentMethodPage >> Execute Payment', async () => { await paymentMethodPage.validateURL(paymentMethodPage.issPageValue); - await paymentMethodPage.executePayment(paymentDetails!, claimDetails!, servicePackage!); + await paymentMethodPage.executePayment(paymentDetails!, paymentDetailsAdyen!, claimDetails!, servicePackage!); await paymentMethodPage.nextPage(); });