From 346cfd5fcd98176313b4eff8b4e82ed4f2ee1fe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20R=C3=B6ll?= <30629157+maxiroellplenty@users.noreply.github.com> Date: Tue, 24 Sep 2024 16:18:36 +0200 Subject: [PATCH] chore: adjust credit card e2e test (#689) * chore: adjust credit card e2e test * fix: credit card test --- apps/web/__tests__/support/pageObjects/CheckoutPageObject.ts | 5 +++++ .../__tests__/test/quarantine/paypalCreditCard.spec.cy.ts | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/web/__tests__/support/pageObjects/CheckoutPageObject.ts b/apps/web/__tests__/support/pageObjects/CheckoutPageObject.ts index d278e80a9..a8aa7a11c 100644 --- a/apps/web/__tests__/support/pageObjects/CheckoutPageObject.ts +++ b/apps/web/__tests__/support/pageObjects/CheckoutPageObject.ts @@ -142,6 +142,11 @@ export class CheckoutPageObject extends PageObject { return this; } + placeCreditCartOrder() { + this.placeOrderButtons.click(); + return this; + } + displaySuccessPage() { this.displaySuccessPages.should('be.visible'); this.thankYouBanner.should('be.visible'); diff --git a/apps/web/__tests__/test/quarantine/paypalCreditCard.spec.cy.ts b/apps/web/__tests__/test/quarantine/paypalCreditCard.spec.cy.ts index 8776cba1e..315983923 100644 --- a/apps/web/__tests__/test/quarantine/paypalCreditCard.spec.cy.ts +++ b/apps/web/__tests__/test/quarantine/paypalCreditCard.spec.cy.ts @@ -26,11 +26,10 @@ describe('Smoke: PayPal credit card order', () => { .goToCheckout() .goToGuestCheckout() .fillContactInformationForm() - .addBillingAddress() .fillShippingAddressForm() .acceptTerms() .checkCreditCard() - .placeOrderButton() + .placeCreditCartOrder() .fillCreditCardForm() .payCreditCard() .displaySuccessPage()