Add Adyen type
This commit is contained in:
parent
10a761d007
commit
2ebc4b9c77
3 changed files with 15 additions and 4 deletions
|
|
@ -72,6 +72,16 @@ export interface IPaymentDetails {
|
||||||
billingAddress?: IAddress,
|
billingAddress?: IAddress,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IPaymentDetailsAdyen {
|
||||||
|
paymentType: PaymentType,
|
||||||
|
username?: string,
|
||||||
|
password?: string,
|
||||||
|
cardNumber?: string,
|
||||||
|
expirationDate?: string,
|
||||||
|
cvv?: string,
|
||||||
|
billingAddress?: IAddress,
|
||||||
|
}
|
||||||
|
|
||||||
// export interface IVehicleDamage {
|
// export interface IVehicleDamage {
|
||||||
// isRearWindowDamage?: boolean,
|
// isRearWindowDamage?: boolean,
|
||||||
// windshieldDamage?: WindshieldDamage,
|
// windshieldDamage?: WindshieldDamage,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { ServicePackage, VehicleDamage } from "./Enums"
|
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"
|
import IBailoutFlags from "./IBailoutFlags"
|
||||||
|
|
||||||
export interface ITestData {
|
export interface ITestData {
|
||||||
|
|
@ -35,7 +35,8 @@ export interface ITestData {
|
||||||
otherVehiclesOnPolicy: IVehicleDetails[], // IF defined, we validate that the vehicles are present.
|
otherVehiclesOnPolicy: IVehicleDetails[], // IF defined, we validate that the vehicles are present.
|
||||||
vehicleDamage: VehicleDamage[], // Array of vehicle damage
|
vehicleDamage: VehicleDamage[], // Array of vehicle damage
|
||||||
appointmentDetails: IAppointmentDetails,
|
appointmentDetails: IAppointmentDetails,
|
||||||
paymentDetails: IPaymentDetails // Payment information
|
paymentDetails: IPaymentDetails, // Payment information
|
||||||
|
paymentDetailsAdyen: IPaymentDetailsAdyen, // Adyen Payment information
|
||||||
isRecalNotification: boolean,
|
isRecalNotification: boolean,
|
||||||
isRecalWarning: boolean,
|
isRecalWarning: boolean,
|
||||||
isRecalVehicle: boolean,
|
isRecalVehicle: boolean,
|
||||||
|
|
|
||||||
|
|
@ -375,7 +375,7 @@ async function runWorkflow(page: Page, testCase: TestCase) {
|
||||||
// Destructure data for easy access
|
// Destructure data for easy access
|
||||||
const { customerDetails, claimDetails, vehicleDetails, addressVehicleDetails, vehicleDamage,
|
const { customerDetails, claimDetails, vehicleDetails, addressVehicleDetails, vehicleDamage,
|
||||||
appointmentDetails, isSafelite, endorsements,
|
appointmentDetails, isSafelite, endorsements,
|
||||||
partQuestions, paymentDetails, isNoComp, isItac, isRecalNotification, isUnverifiedPolicyAfterVehicleLookup,
|
partQuestions, paymentDetails, paymentDetailsAdyen, isNoComp, isItac, isRecalNotification, isUnverifiedPolicyAfterVehicleLookup,
|
||||||
isRecalWarning, servicePackage, hasOemEndorsement, hasStateLawPopup, otherVehiclesOnPolicy, isUseVehicleFromAddressLookup,
|
isRecalWarning, servicePackage, hasOemEndorsement, hasStateLawPopup, otherVehiclesOnPolicy, isUseVehicleFromAddressLookup,
|
||||||
isSeparateApptsWarning, vehiclePartQuestions, editVehicleDetails, isAddressLookupValidations,
|
isSeparateApptsWarning, vehiclePartQuestions, editVehicleDetails, isAddressLookupValidations,
|
||||||
hasMilitaryWarning, capabilityQuestions, isUseVehicleOnPolicy,
|
hasMilitaryWarning, capabilityQuestions, isUseVehicleOnPolicy,
|
||||||
|
|
@ -879,7 +879,7 @@ async function runWorkflow(page: Page, testCase: TestCase) {
|
||||||
if (isPolicyFound && (isUseVehicleOnPolicy ?? true) && claimDetails!.policyDeductible > 0) {
|
if (isPolicyFound && (isUseVehicleOnPolicy ?? true) && claimDetails!.policyDeductible > 0) {
|
||||||
await test.step('PaymentMethodPage >> Execute Payment', async () => {
|
await test.step('PaymentMethodPage >> Execute Payment', async () => {
|
||||||
await paymentMethodPage.validateURL(paymentMethodPage.issPageValue);
|
await paymentMethodPage.validateURL(paymentMethodPage.issPageValue);
|
||||||
await paymentMethodPage.executePayment(paymentDetails!, claimDetails!, servicePackage!);
|
await paymentMethodPage.executePayment(paymentDetails!, paymentDetailsAdyen!, claimDetails!, servicePackage!);
|
||||||
await paymentMethodPage.nextPage();
|
await paymentMethodPage.nextPage();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue