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:2123: info text issue for cardholdername in theming capabilities #231

Closed chintan-soni-cko closed 10 months ago

chintan-soni-cko commented 10 months ago

Issue

PIMOB-2123

Proposed changes

Steps to reproduce: 1 When loading the cardholder name in the payment form and making it mandatory, remove the info text from the code 2 Although removing info text, in the UI optional text is displaying from the default UI

Solution: in the payment form, the cardholder's name is able to make itself as optional and mandatory. In this case, if merchants dont want to set info text in theming capabilities, they should able to hide the info text by just not adding info text in theming.

Test Steps

In the CustomPaymentFormTheme class comment setInfoTextId from cardHolderName and in the UI info text will not be visible

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

There are no test cases for PaymentDetailsStyleMapper at the moment. We can add into unit testing improvement for Frames. just to make it thoroughly covered by test cases.

jheng-hao-lin-cko commented 10 months ago

Let's add some tests covering the new logic?

Also, quick question: does this behavior apply to other fields?

chintan-soni-cko commented 10 months ago

Let's add some tests covering the new logic?

Also, quick question: does this behavior apply to other fields?

@jheng-hao-lin-cko Please refer conversation and its only apply to cardholder name in payment details because it is the only component which can be make hidden, optional and mandatory