-
Notifications
You must be signed in to change notification settings - Fork 135
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
[Payment Method Improvements] Update change due based on user input #11586
Conversation
Generated by 🚫 Danger |
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #11586 +/- ##
=========================================
Coverage 40.32% 40.33%
Complexity 5200 5200
=========================================
Files 1087 1087
Lines 63229 63239 +10
Branches 8667 8668 +1
=========================================
+ Hits 25500 25505 +5
- Misses 35435 35440 +5
Partials 2294 2294 ☔ View full report in Codecov by Sentry. |
@@ -52,4 +58,12 @@ class ChangeDueCalculatorViewModel @Inject constructor( | |||
fun onBackPressed() { | |||
_navigationEvent.value = Unit | |||
} | |||
|
|||
fun updateAmountReceived(amount: BigDecimal) { |
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.
Would be nice to add a test on this logic
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.
For sure, thanks for the suggestion. I will add it in this draft PR:
#11594
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.
LGTM! Left a comment regarding the possibility of adding a test
Closes: #11584
Description
I added the
unit-tests-exemption
label as this PR is dependent on others and will likely change. Updating the test is ticketed here:#11542
This PR is to update the change due correctly based on the user input for how much cash was given.
Testing instructions
Expected: You should see the correct values update for Cash received and Change Due
RELEASE-NOTES.txt
if necessary. Use the "[Internal]" label for non-user-facing changes.