Closed samiuelson closed 2 days ago
1 Error | |
---|---|
:no_entry_sign: | This PR is tagged with status: do not merge label(s). |
1 Warning | |
---|---|
:warning: | Class CardReaderPaymentEvent is missing tests, but unit-tests-exemption label was set to ignore this. |
Generated by :no_entry_sign: Danger
App Name | WooCommerce-Wear Android | |
Platform | ⌚️ Wear OS | |
Flavor | Jalapeno | |
Build Type | Debug | |
Commit | 9f7c8a251838423a8da9a093b132b2bb3ca11951 | |
Direct Download | woocommerce-wear-prototype-build-pr12870-9f7c8a2.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 | 9f7c8a251838423a8da9a093b132b2bb3ca11951 | |
Direct Download | woocommerce-prototype-build-pr12870-9f7c8a2.apk |
Separating CardReaderPaymentController's events from MultiLiveEvent
Closes: #12823
This is part 2 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.
Description
This PR refactors the way
CardReaderPaymentController
emits events:CardReaderPaymentController
emits nowsealed class CardReaderPaymentEvent
instances. This is safer to operate on a set of (sealed) classes bound to the parent class. Additionally, this removes the dependency on theMultiLiveEvent.Event
andMultiLiveEvent
inCardReaderPaymentController
. These classes are not needed and desirable in Woo POS.CardReaderPaymentViewModel
subscribes to the controller'sevents
observable, maps it, and exposes in the form of the old model (extendingMultiLiveEvent.Event
) emitted byLiveData
—retrofitting the existing UI implementation.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; and verified that the IPP flow works and is not changed. Configurations:
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: