Closed joshheald closed 3 days ago
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
📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.
App Name | WooCommerce iOS | |
Build Number | pr14437-333e8b1 | |
Version | 21.1 | |
Bundle ID | com.automattic.alpha.woocommerce | |
Commit | 333e8b1170ad36e67944a5a6f1cc41efaa939ca2 | |
App Center Build | WooCommerce - Prototype Builds #11631 |
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.
👋 I started the code review but haven't had time to test any flow, if nobody beats me to it I can continue tomorrow.
Closes: #14417
Description
Sorry this is so big... I really couldn't find a way to reduce the size without also breaking the app in the process...
This PR moves order creation/syncing, and the associated OrderState, to the new aggregate model.
I've also avoided exposing the order; all we need to actually show from it is the totals, so those are included in the order state now.
Tests mostly work, but there are some which aren't practical in the
TotalsViewModelTests
at the moment. Inline notes in the comments, and as I move more state into the aggregate model I'll be able to reinstate them (as tests on the aggregate model)Testing information
This requires smoke testing of the order creation process, and some of the payments actions.
Edit order
button should take you back to the item list (breakpoint onhttps://api.stripe.com/v1/payment_intents
). Note that there's an issue even in trunk with thetry again
option on this error: the Stripe SDK doesn't always make the expected request, but instead says that the user is offline sometimes.https://public-api.wordpress.com/rest/v1.1/jetpack-blogs/*/rest-api/ after you tap the card
)Try again
andNew order
actions (additional breakpoint onhttps://public-api.wordpress.com/rest/v1.1/jetpack-blogs/*/rest-api/?json=true&path=/wc/v3/orders/*
)Screenshots
https://github.com/user-attachments/assets/1c1550b5-e0b4-4db9-ad1a-60d927d93d51
RELEASE-NOTES.txt
if necessary.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: