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 Payment Method Id mandate flows #5035

Merged
merged 10 commits into from
Jun 20, 2024
Merged

Conversation

likhinbopanna
Copy link
Contributor

@likhinbopanna likhinbopanna commented Jun 18, 2024

Type of Change

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

Description

Added payment_method_id mandate flows to Cypress automation, previously only mandate_id flows were included.
Currently implemented connectors - Cybersource , Stripe , Adyen and Bankofamerica

Additional Changes

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

Motivation and Context

Currently we had only mandate_id flows so added pmid mandate flows

How did you test it?

CYPRESS:

  • Cybersource
cybersource
  • Bankofamerica
BOA
  • Adyen
adyen
  • Bluesnap
Bluesnap
  • NMI
nmi
  • paypal
paypal
  • Stripe
    Uploading image.png…

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

@likhinbopanna likhinbopanna requested review from a team as code owners June 18, 2024 18:59
@likhinbopanna likhinbopanna self-assigned this Jun 18, 2024
@likhinbopanna likhinbopanna added A-CI-CD Area: Continuous Integration/Deployment S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Jun 18, 2024
Comment on lines 80 to 81
() => {
it("Create No 3DS Payment Intent", () => {
Copy link
Member

Choose a reason for hiding this comment

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

"future proofing" needs to be done.
Again, TL;DR: Add it to the beginning of every context()

Comment on lines +382 to +389
mandate_data: null,
customer_acceptance: {
acceptance_type: "offline",
accepted_at: "1963-05-03T04:07:52.723Z",
online: {
ip_address: "125.0.0.1",
user_agent: "amet irure esse",
},
Copy link
Member

Choose a reason for hiding this comment

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

We can move these to a const and call it like we do for singleUseMandateData and multiUseMandateData. Possibly put that in commons.js and import?

This needs to be done everywhere to reduce duplicate code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we can take this up later

Copy link
Member

Choose a reason for hiding this comment

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

Since these changes are introduced in this PR and still need more review, I thought of getting this right in this PR itself. If other reviewers are okay with this, I've no issues.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This not introduced in this PR , this is replicated from mandate_id test cases , so we can have other PR for all the Tests

Copy link
Member

Choose a reason for hiding this comment

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

Cool, we should take this up in the coming PR and not leave it as it is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

Comment on lines +405 to +413
mandate_data: null,
customer_acceptance: {
acceptance_type: "offline",
accepted_at: "1963-05-03T04:07:52.723Z",
online: {
ip_address: "125.0.0.1",
user_agent: "amet irure esse",
},
},
Copy link
Member

Choose a reason for hiding this comment

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

here as well., below, everywhere.

cypress-tests/cypress/support/commands.js Outdated Show resolved Hide resolved
cypress-tests/cypress/support/commands.js Outdated Show resolved Hide resolved
cypress-tests/cypress/support/commands.js Outdated Show resolved Hide resolved
Copy link
Member

@pixincreate pixincreate left a comment

Choose a reason for hiding this comment

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

ok, we can take refactoring later

@pixincreate pixincreate added this pull request to the merge queue Jun 20, 2024
Merged via the queue into main with commit 6157162 Jun 20, 2024
11 checks passed
@pixincreate pixincreate deleted the add-pm-id-mandates branch June 20, 2024 11:36
@pixincreate pixincreate removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Jun 20, 2024
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants