-
Notifications
You must be signed in to change notification settings - Fork 663
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
Add prefix
to form field value in PhoneNumberController
#9571
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,7 +51,7 @@ internal fun billingDetailsParams(): RequestMatcher { | |
internal fun fullBillingDetailsParams(): RequestMatcher { | ||
return RequestMatchers.composite( | ||
bodyPart(urlEncode("billing_details[name]"), urlEncode(CustomerSheetPage.NAME)), | ||
bodyPart(urlEncode("billing_details[phone]"), CustomerSheetPage.PHONE_NUMBER), | ||
bodyPart(urlEncode("billing_details[phone]"), urlEncode("+1${CustomerSheetPage.PHONE_NUMBER}")), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Were we sending this to the backend incorrectly!??!? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately yeah :(. This has been a fairly long standing issue (since 2022 at least) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was this broken in PaymentSheet as well? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah since we weren't manually converting the text input. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting. Nice fix! |
||
bodyPart(urlEncode("billing_details[email]"), urlEncode(CustomerSheetPage.EMAIL)), | ||
bodyPart(urlEncode("billing_details[address][line1]"), urlEncode(CustomerSheetPage.ADDRESS_LINE_ONE)), | ||
bodyPart(urlEncode("billing_details[address][line2]"), urlEncode(CustomerSheetPage.ADDRESS_LINE_TWO)), | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -263,7 +263,7 @@ class USBankAccountFormViewModelTest { | |
val input = PaymentSelection.New.USBankAccount.Input( | ||
name = "Some One", | ||
email = "[email protected]", | ||
phone = "1112223456", | ||
phone = "+11112223456", | ||
address = Address( | ||
line1 = "123 Not Main Street", | ||
line2 = "Apt 123", | ||
|
@@ -308,7 +308,7 @@ class USBankAccountFormViewModelTest { | |
val input = PaymentSelection.New.USBankAccount.Input( | ||
name = "Some One", | ||
email = "[email protected]", | ||
phone = "1112223456", | ||
phone = "+11112223456", | ||
address = Address( | ||
line1 = "123 Not Main Street", | ||
line2 = "Apt 123", | ||
|
@@ -363,7 +363,7 @@ class USBankAccountFormViewModelTest { | |
billingDetails = PaymentSheet.BillingDetails( | ||
name = CUSTOMER_NAME, | ||
email = CUSTOMER_EMAIL, | ||
phone = CUSTOMER_PHONE_COUNTRY_CODE + CUSTOMER_PHONE, | ||
phone = CUSTOMER_PHONE, | ||
address = CUSTOMER_ADDRESS, | ||
), | ||
billingDetailsCollectionConfiguration = PaymentSheet.BillingDetailsCollectionConfiguration( | ||
|
@@ -505,7 +505,7 @@ class USBankAccountFormViewModelTest { | |
billingDetails = PaymentSheet.BillingDetails( | ||
name = CUSTOMER_NAME, | ||
email = CUSTOMER_EMAIL, | ||
phone = CUSTOMER_PHONE_COUNTRY_CODE + CUSTOMER_PHONE, | ||
phone = CUSTOMER_PHONE, | ||
address = CUSTOMER_ADDRESS, | ||
), | ||
billingDetailsCollectionConfiguration = PaymentSheet.BillingDetailsCollectionConfiguration( | ||
|
@@ -1626,8 +1626,7 @@ class USBankAccountFormViewModelTest { | |
const val CUSTOMER_EMAIL = "[email protected]" | ||
const val STRIPE_ACCOUNT_ID = "stripe_account_id" | ||
const val CUSTOMER_COUNTRY = "US" | ||
const val CUSTOMER_PHONE_COUNTRY_CODE = "+1" | ||
const val CUSTOMER_PHONE = "3105551234" | ||
const val CUSTOMER_PHONE = "+13105551234" | ||
val CUSTOMER_ADDRESS = PaymentSheet.Address( | ||
line1 = "123 Main Street", | ||
line2 = "Apt 456", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not that
formFieldValue
transmits this, we don't need to convert it manually. This is covered by Maestro tests.