-
Notifications
You must be signed in to change notification settings - Fork 664
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
Select payment method when it is set as the default PM #10257
base: master
Are you sure you want to change the base?
Conversation
Diffuse output:
APK
|
@@ -54,7 +54,6 @@ internal class CustomerStateHolder( | |||
val newCustomer = customer.value?.copy(defaultPaymentMethodId = paymentMethod?.id) | |||
|
|||
savedStateHandle[SAVED_CUSTOMER] = newCustomer | |||
updateMostRecentlySelectedSavedPaymentMethod(paymentMethod = paymentMethod) |
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.
this isn't needed anymore -- setting the selection will end up updating the most recently selected saved PM, so we don't need a separate call for this
@@ -292,11 +300,60 @@ internal class CustomerSessionPaymentSheetActivityTest { | |||
composeTestRule.onUpdateScreenRemoveButton().assertDoesNotExist() | |||
} | |||
|
|||
@Test | |||
fun `Setting default card selects that card in vertical mode`() { |
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.
ran ShampooRule with 1000 iterations to ensure this isn't flaky
Summary
Select payment method when it is set as the default PM
Motivation
Updating behavior to match designs from figma
Testing
Manually verified in horizontal mode, vertical mode, embedded. I can add end to end tests for horizontal + embedded as a follow up!
Screen recording
setting.default.updates.selection.webm