checkout / frames-android

Frames Android: making native card payments simple
https://www.checkout.com/docs/integrate/sdks/android-sdk
MIT License
47 stars 32 forks source link

PIMOB:2119 - Country prefilled without saving from billing form was fixed #227

Closed chintan-soni-cko closed 10 months ago

chintan-soni-cko commented 10 months ago

Issue

PIMOB-2119

Proposed changes

Problem statement: When the merchant has not added any prefilled data navigates to the billing form and selects the country. Observed that country is updated in the payment form without saving it from the billing form. Conflict is happening because the country is directly updating in billing address from the payment state manager

Solution: Added new parameter selectedCountry in paymentstatemanager

Test Steps

Case 1 (same for prefilled data)

  1. open the billing form and select any country
  2. Go back to the payment form, the country should not be updated there

Case-2:

  1. Open the billing form, select any country and save the billing form (For instance, U.K)
  2. Go back to the payment form, the country should be updated there
  3. Open the edit billing form, and change any country (F.i, Ukraine)
  4. Goto the payment form without saving any details in the billing form. A country should be the U.K. in the payment form
  5. Same when open edit billing form country U.K should be selected

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you choose the solution you did and what alternatives you considered, etc...

chintan-soni-cko commented 10 months ago

Verified locally it works fine. I suggest we have a fully test plan for all relevant tickets, so far we have done many tests and it's good to have a list of test cases to go through when we have all development pieces are merged.

Sure thing. I have seen from the Sonarqube and a few lines of code are potential coverage we can address. I will list out it.