diff --git a/playwright-tests/pages/PaymentMethodPage.ts b/playwright-tests/pages/PaymentMethodPage.ts index ace2f8ac..c715e02f 100644 --- a/playwright-tests/pages/PaymentMethodPage.ts +++ b/playwright-tests/pages/PaymentMethodPage.ts @@ -1,7 +1,7 @@ import { expect, type Locator, type Page } from '@playwright/test'; import { BasePage } from './BasePage'; -import { IPaymentDetails } from '@business-logic/types/CustomerDetails'; -import { PaymentType } from '@business-logic/types/Enums'; +import { IClaimDetails, IPaymentDetails } from '@business-logic/types/CustomerDetails'; +import { PaymentType, ServicePackage } from '@business-logic/types/Enums'; import { PaymentPage } from './PaymentPage'; import { AfterpayPage } from './AfterpayPage'; import { PaypalPage } from './PaypalPage'; @@ -40,7 +40,7 @@ export class PaymentMethodPage extends BasePage { this.submitButton = this.page.getByRole('button', { name: 'Submit' }); } - async executePayment(paymentDetails: IPaymentDetails) { + async executePayment(paymentDetails: IPaymentDetails, claimDetails: IClaimDetails, servicePackage: ServicePackage) { const browserContext = this.page.context(); switch (paymentDetails.paymentType) { @@ -67,7 +67,7 @@ export class PaymentMethodPage extends BasePage { const afterpayPage = new AfterpayPage(afterpayPopup); // Execute payment - await afterpayPage.executeAfterpayPayment(paymentDetails); + await afterpayPage.executeAfterpayPayment(paymentDetails, claimDetails, servicePackage); break; case PaymentType.PayAtService: