Open samiuelson opened 1 week ago
2 Errors | |
---|---|
:no_entry_sign: | Please add tests for class InteracRefundFailure (or add unit-tests-exemption label to ignore this). |
:no_entry_sign: | This PR is tagged with status: do not merge label(s). |
1 Warning | |
---|---|
:warning: | This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews. |
Generated by :no_entry_sign: Danger
App Name | WooCommerce-Wear Android | |
Platform | ⌚️ Wear OS | |
Flavor | Jalapeno | |
Build Type | Debug | |
Commit | 0d3565ba07e27c0976a07fda7f5e2fcab65e863a | |
Direct Download | woocommerce-wear-prototype-build-pr12898-0d3565b.apk |
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
App Name | WooCommerce Android | |
Platform | 📱 Mobile | |
Flavor | Jalapeno | |
Build Type | Debug | |
Commit | 0d3565ba07e27c0976a07fda7f5e2fcab65e863a | |
Direct Download | woocommerce-prototype-build-pr12898-0d3565b.apk |
Attention: Patch coverage is 97.43590%
with 4 lines
in your changes missing coverage. Please review.
Project coverage is 40.65%. Comparing base (
44115aa
) to head (71e5b37
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Switching from
viewStateData
topaymentState
Closes: #12825
Description
This PR:
val viewStateData: LiveData<ViewState>
fromCardReaderPaymentController
CardReaderPaymentController.paymentState
toViewState
inCardReaderPaymentViewModel
, using theCardReaderPaymentStateToViewStateMapper
use case classThe goal of that PR is to make the payment controller independent of the
ViewState
class, and extract mapping of theCardReaderPaymentOrRefundState
emitted by controller toViewState
(UI state of the existing IPP flow) in the target VM. Thanks to such separation, the controller will allow flexible reuse of the payment flow in the POS.This is part 4 of 5 PRs refactoring the Payment flow:
⚠️ Don't merge — the branch will be merged together with the above ones after additional testing of the whole refactor.
Next steps
I'll add unit tests for
CardReaderPaymentController
, in the next PR.Testing information
As a result of the refactoring done within this PR, the app should work without any change. It's crucial to test the IPP flow in the store management and POS modes against regression. It may be useful to base on the test plan (pdfdoF-5Jz-p2).
The tests that have been performed
I tested the payment collection flow in both POS and store management modes, using card-present payment and TTP; verified that the IPP flow works and is not changed.
I wasn't able to test Interac payments/refunds.
The build from this PR will be used for call for testing – extra manual testing focused on regression.
[x] I have considered if this change warrants release notes and have added them to
RELEASE-NOTES.txt
if necessary. Use the "[Internal]" label for non-user-facing changes.Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: