-
Notifications
You must be signed in to change notification settings - Fork 136
Connecting shipping rates #13105
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
Connecting shipping rates #13105
Conversation
Generated by 🚫 Danger |
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
|
|
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
| import kotlinx.coroutines.delay | ||
| import javax.inject.Inject | ||
| import kotlin.random.Random | ||
| @Suppress("MagicNumber") |
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.
This use case will be updated in the next PR to fetch real data, for now, I'm skipping unit testing it
| ) | ||
|
|
||
| data class ShippingRate( | ||
| data class ShippingRateUI( |
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.
Renaming ShippingRate -> ShippingRateUI. The new model will be added in the next PR
| } | ||
|
|
||
| @Composable | ||
| private fun WooShippingShippingRatesSection( |
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.
This new composable will be in charge of representing the shipping rate status
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #13105 +/- ##
==========================================
Coverage 40.42% 40.43%
- Complexity 6200 6203 +3
==========================================
Files 1294 1295 +1
Lines 74534 74637 +103
Branches 10197 10205 +8
==========================================
+ Hits 30131 30177 +46
- Misses 41790 41843 +53
- Partials 2613 2617 +4 ☔ View full report in Codecov by Sentry. |
| originCountry = "US" | ||
| ) | ||
|
|
||
| private val mockSelectedPackage = PackageDAO( |
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.
Shipping rates need a package to be selected
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'll adjust this through #13111.
ThomazFB
left a comment
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.
Looks good, @atorresveiga! I focused on checking the UI and overall wiring between ViewModel and use case. Looks good and great work with the unit test coverage.
Part of: #12998
Description
This PR connects shipping rates with the mock data returned from the
GetShippingRatesuse case. Additionally, it adds logic for changing the sort order and refreshing the shipping rates.Changes included here:
GetShippingRatesuse case.Testing information
TC1
TC2
First apply this patch to force the get shipping labels use case to fail
Patch
The tests that have been performed
Images/gif
Screen_recording_20241211_114452.mp4
RELEASE-NOTES.txtif 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: