Add Adyen type

This commit is contained in:
JennyNou 2026-04-15 08:23:26 -04:00
parent 10a761d007
commit 2ebc4b9c77
3 changed files with 15 additions and 4 deletions

View file

@ -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,

View file

@ -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,

View file

@ -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();
});