From e6d43a001a083ae4a388bde916abf7ad5eb98d22 Mon Sep 17 00:00:00 2001 From: likhinbopanna <131246334+likhinbopanna@users.noreply.github.com> Date: Fri, 30 Aug 2024 12:46:44 +0530 Subject: [PATCH] ci(cypress): Handle failures for trustpay bank-redirects (#5734) --- cypress-tests/cypress/e2e/PaymentUtils/Trustpay.js | 5 ++++- cypress-tests/cypress/support/redirectionHandler.js | 7 +++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cypress-tests/cypress/e2e/PaymentUtils/Trustpay.js b/cypress-tests/cypress/e2e/PaymentUtils/Trustpay.js index 4d2b607a6c..c209fe5a6d 100644 --- a/cypress-tests/cypress/e2e/PaymentUtils/Trustpay.js +++ b/cypress-tests/cypress/e2e/PaymentUtils/Trustpay.js @@ -321,7 +321,10 @@ export const connectorDetails = { Response: { status: 200, body: { - status: "requires_customer_action", + status: "failed", + error_code: "1133001", + error_message: + "Giropay payments are not enabled in Project 4107608031", }, }, }, diff --git a/cypress-tests/cypress/support/redirectionHandler.js b/cypress-tests/cypress/support/redirectionHandler.js index fdbd8e5197..6540632c89 100644 --- a/cypress-tests/cypress/support/redirectionHandler.js +++ b/cypress-tests/cypress/support/redirectionHandler.js @@ -247,10 +247,9 @@ function bankRedirectRedirection( break; case "ideal": cy.contains("button", "Select your bank").click(); - cy.get('[data-testid="ideal-box-bank-item-INGBNL2A-content"]') - .should("be.visible") - .click(); - + cy.get( + 'button[data-testid="bank-item"][id="bank-item-INGBNL2A"]' + ).click(); break; case "giropay": cy.get("._transactionId__header__iXVd_").should(