-
Notifications
You must be signed in to change notification settings - Fork 37
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
Adds fetch all-domains api call #2867
Conversation
…ll-domains response
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.
example/src/test/java/org/wordpress/android/fluxc/network/rest/wpcom/site/SiteRestClientTest.kt
Outdated
Show resolved
Hide resolved
@@ -561,6 +584,13 @@ class SiteRestClientTest { | |||
return initGetResponse(SitesFeaturesRestResponse::class.java, data ?: mock(), error) | |||
} | |||
|
|||
private suspend fun initAllDomainsResponse( | |||
data: AllDomainsResponse? = null, | |||
error: WPComGsonNetworkError? = null |
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.
Optional nitpick: the property is never used. If we don't want to test the error cases for the "fetch all domains" flow, we can remove it and pass null
directly, or we can have a test for a bad case too. What do you think?
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.
Thank you for catching this @justtwago 🙇
I've added some tests for the error cases with 5bed1ee
Co-authored-by: Artyom Vlasov <[email protected]>
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.
Thank you a lot for the changes! 🚀
Part of wordpress-mobile/WordPress-Android#19165
This PR adds the ability to fetch all domains for the logged in user.
Note: For simplicity and given that the domains management feature will use the existing fetchSiteDomains call I decided to add the new call in the
SiteStore
though it is not directly related to the current site.To test: