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

feat(cypress): add test case for incorrect and empty card types #6550

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

Conversation

kashif-m
Copy link
Contributor

Type of Change

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

Description

Test cases for #6512

Additional Changes

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

Motivation and Context

Adds test cases for card types.

How did you test it?

Locally.

image

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

@kashif-m kashif-m self-assigned this Nov 13, 2024
@kashif-m kashif-m requested a review from a team as a code owner November 13, 2024 05:26
Copy link

semanticdiff-com bot commented Nov 13, 2024

Review changes with  SemanticDiff

Changed Files
File Status
  cypress-tests/cypress/e2e/PaymentTest/00022-Variations.cy.js  0% smaller
  cypress-tests/cypress/e2e/PaymentUtils/Commons.js  0% smaller

Gnanasundari24
Gnanasundari24 previously approved these changes Nov 19, 2024
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.

looks good to me other wise

Comment on lines +101 to +113
const billingAddress = {
address: {
line1: "1467",
line2: "Harrison Street",
line3: "Harrison Street",
city: "San Fransico",
state: "California",
zip: "94122",
country: "BR",
first_name: "john",
last_name: "doe",
},
};
Copy link
Member

Choose a reason for hiding this comment

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

if this is specific to a connector or a payment method, then i would recommend having country field empty and override it in respective fields wherever it is used.

also, if i'm not asking too much, can you please also apply the same changes to rest of the file where ever billing exist and is not null.

that way, we can do something like:

billing: {
  ...billingAddress,
  country: DE / GB / BR / IN / US
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] payment_method_type for cards is null
4 participants