-
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
MSD - Stats Card - Handle Error Inside Cards Response #2251
MSD - Stats Card - Handle Error Inside Cards Response #2251
Conversation
(TDD) Tests will fail at this point
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
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.
@ashiagr All looks good. The initial data values have been set to “0” and “empty” as we discussed. The errors are specific to the card type and embedded as such, In addition the errors will flow through to the client. Even if we only show a generic card today, we are ready to handle the specific errors in the future.
Tests work as expected. +1
…o issue/15749-msd-todays-stats-handle-error-response # Conflicts: # fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpcom/dashboard/CardsRestClient.kt
…o issue/15749-msd-todays-stats-handle-error-response # Conflicts: # example/src/test/java/org/wordpress/android/fluxc/network/rest/wpcom/dashboard/CardsRestClientTest.kt # fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpcom/dashboard/CardsRestClient.kt
…o issue/15749-msd-todays-stats-handle-error-response # Conflicts: # example/src/test/java/org/wordpress/android/fluxc/store/dashboard/CardsStoreTest.kt
…o issue/15749-msd-todays-stats-handle-error-response
@ashiagr - I retested this PR using WPAndroid#[15893 ](MSD - Handle Single Dashboard Card Error in UI). I was able to see the stats card properly AND no stats card when using a site in which I don't have permission to view stats. I intercepted the response to verify this. I'm going to leave the merging for you because I'm not 100% sure which PRs need to go first. |
Parent wordpress-mobile/WordPress-Android#15749
This draft PR:
today's stats
andposts
cards responses to include error.today's stats
andposts
card model to include error.To test:
CardsRestClient
andCardsStore
classes and make sure that the accompanying tests are working as expected.Notes:
fetchCards
endpoint is not replaced withv1_1
version yet to avoid rest route not found errors.fetchCards
endpoint withv1_1
version.WordPress-Android
PR is up and we've tested cards with errors feature.