-
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 Success Response #2244
MSD - Stats Card - Handle Success Response #2244
Conversation
@ashiagr , yes, let's do that!
NOTE:: We decided against the above approach, this is here for history purposes |
- Added comments to todays_stats. - Moved nested todays_stats to keep it at the same level as posts node in cards.json and corresponding response and model classes. Note that the existing endpoint will not return the stats card yet. It will be switched to a newer version in future commits.
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
@ashiagr - The |
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 Very well done 👏
❤️ for the patience in changing all those tests.
I like the improvement that added "label" to types so the arguments build out works smoothly.
I tested using the WPAndroid#[15893 ](MSD - Handle Single Dashboard Card Error in UI) and was able to view the stats card as expected. I also visited a few web sites and PTR's, and the counts updated.
Please feel free to merge when you feel comfortable.
Parent wordpress-mobile/WordPress-Android#15749
This is a draft PR that includes the following changes for adding the
Stats Card
to thecards
result:There's nothing to test in this PR as the
dashboard/cards
endpoint doesn't yet include theStats Card
yet. So that existing tests work as expected, I've updated the following test classes:CardsRestClientTest
is updated to addStatsResponse
andcards.json
is updated to include theStats Card
.CardsStoreTest
is updated to addSTATS_ENTITY
toCARDS_ENTITY
.Note: We might want to keep this PR in draft mode until the
dashboard/cards
endpoint is updated for theStats Card
as the final structure might vary. With the current prod version of the endpoint, the stats card response beingnull
is not added to the cards list.