-
Notifications
You must be signed in to change notification settings - Fork 132
[Payment Method Improvements] Cash Payment Improvements #11414
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
Conversation
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
...in/kotlin/com/woocommerce/android/ui/payments/methodselection/ChangeDueCalculatorFragment.kt
Outdated
Show resolved
Hide resolved
...in/kotlin/com/woocommerce/android/ui/payments/methodselection/ChangeDueCalculatorFragment.kt
Outdated
Show resolved
Hide resolved
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.
Conceptually everything looks correct to me 👍 I just left a few minor suggestions
import org.mockito.kotlin.whenever | ||
|
||
@ExperimentalCoroutinesApi | ||
class ChangeDueCalculatorViewModelTest : BaseUnitTest() { |
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.
I added this unit test but I'm not sure there's much to test yet. Can I leave these TODO's for the next PR?
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.
Yes. Fine to fix in the next PR. Think of it as test-driven development. You might even ticket that out: "Add implementation so order details load successfully emits success state
test passes"
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.
I added it as a task on this ticket. I can easily convert to GH issue if it ends up being a separate PR from the other tasks.
...n/kotlin/com/woocommerce/android/ui/payments/methodselection/ChangeDueCalculatorViewModel.kt
Outdated
Show resolved
Hide resolved
...n/kotlin/com/woocommerce/android/ui/payments/methodselection/ChangeDueCalculatorViewModel.kt
Outdated
Show resolved
Hide resolved
...n/kotlin/com/woocommerce/android/ui/payments/methodselection/ChangeDueCalculatorViewModel.kt
Outdated
Show resolved
Hide resolved
...n/kotlin/com/woocommerce/android/ui/payments/methodselection/ChangeDueCalculatorViewModel.kt
Outdated
Show resolved
Hide resolved
...erce/src/test/kotlin/com/woocommerce/android/ui/payments/ChangeDueCalculatorViewModelTest.kt
Outdated
Show resolved
Hide resolved
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.
Thanks @kidinov This should now be updated and ready for review. Not sure why I can't get it to pass CI 😢
There are tests that are failing. Click on "details" next to the failed job and look up what tests should be fixed
Overal looks good to me. I left a few comments. Please take a look
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #11414 +/- ##
============================================
- Coverage 40.83% 40.81% -0.02%
- Complexity 5180 5181 +1
============================================
Files 1070 1071 +1
Lines 62310 62335 +25
Branches 8499 8500 +1
============================================
+ Hits 25444 25445 +1
- Misses 34578 34602 +24
Partials 2288 2288 ☔ View full report in Codecov by Sentry. |
@kidinov it looks like CI is passing now with those changes. Let me know if you have additional suggestions. |
...n/kotlin/com/woocommerce/android/ui/payments/methodselection/ChangeDueCalculatorViewModel.kt
Outdated
Show resolved
Hide resolved
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
I left one NP comment regarding visibility of a method. Feel free to ignore it
Closes: #11413
Description
This PR introduces a new "Change Due" calculator screen for merchants processing cash payments, enhancing the existing cash handling functionalities in our mobile app.
The new screen will only be visible when the 'OTHER_PAYMENT_METHODS' feature flag is enabled, ensuring that this functionality can be tested incrementally and does not impact users negatively during the roll-out phase.
Testing instructions
The following will be in a subsequent PR for easier review:
Images/gif
Images or gifs demonstrating the new screen and comparisons to the previous version will be attached here.
RELEASE-NOTES.txt
if necessary. Use the "[Internal]" label for non-user-facing changes.