Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(cypress): Add bank redirect cypress test cases #4507

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tsdk02
Copy link

@tsdk02 tsdk02 commented Apr 30, 2024

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Added test scenarios for Bank Redirect method for Trustpay for the following payment methods:

  • Ideal
  • Giropay

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

To increase coverage of testing for Bank Redirect Methods for various connectors.

How did you test it?

Wrote Cypress test scenarios for paymentIntent creation, paymentConfirmation, and handleRedirection for the above mentioned bank redirect payment methods for Trustpay.
Screenshot 2024-04-30 at 6 42 55 PM
Screenshot 2024-04-30 at 6 43 25 PM

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@tsdk02 tsdk02 added A-CI-CD Area: Continuous Integration/Deployment S-waiting-on-review Status: This PR has been implemented and needs to be reviewed C-test Category: Tests labels Apr 30, 2024
@tsdk02 tsdk02 added this to the April 2024 milestone Apr 30, 2024
@tsdk02 tsdk02 self-assigned this Apr 30, 2024
@tsdk02 tsdk02 requested a review from a team as a code owner April 30, 2024 13:17
Comment on lines +11 to +17
before("seed global state", () => {

cy.task('getGlobalState').then((state) => {
globalState = new State(state);
console.log("seeding globalState -> " + JSON.stringify(globalState));
})
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you format the file?


it("confirm-call-test", () => {
let det = getConnectorDetails(globalState.get("connectorId"))["BankRedirect"]["3DS"]["ideal"];
cy.task('cli_log', "GLOBAL STATE -> " + JSON.stringify(globalState.data));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the logs if it is not necessary


it("confirm-call-test", () => {
let det = getConnectorDetails(globalState.get("connectorId"))["BankRedirect"]["3DS"]["giropay"];
cy.task('cli_log', "GLOBAL STATE -> " + JSON.stringify(globalState.data));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove the logs

"billing_name": "John Doe"
},
"bank_name": "ing",
"preferred_language": "en",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did we add preferred language field in all the payment method data? this field is only in sofort pm ryt?

"billing_details": {
"billing_name": "John Doe"
},
"bank_name": "ing",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these two fields are in giropay pm data - bank_account_bic, bank_account_iban, why is this not added?
if trustpay doesn't require this, please pass it as none

"billing_details": {
"billing_name": "John Doe"
},
"bank_name": "hypo_noe_lb_fur_niederosterreich_u_wien",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bank_name is not present in sofort pm data. why is this been introduced?

"billing_name": "John Doe"
},
"bank_name": "hypo_noe_lb_fur_niederosterreich_u_wien",
"preferred_language": "en",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you check with bank redirect pm data, and give appropriate fields , and please remove unnecessary ones

@@ -27,7 +27,7 @@
"address": {
"state": "New York",
"city": "New York",
"country": "US",
"country": "NL",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this change? ig this country has been used by the card pm test cases. please revert this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI-CD Area: Continuous Integration/Deployment C-test Category: Tests S-waiting-on-review Status: This PR has been implemented and needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Add Cypress Test Cases for Bank Redirect Payment Methods for Trustpay and Adyen
3 participants