msw: add policy mock handlers - #1199
Open
deer-wmde wants to merge 26 commits into
Open
Conversation
|
Deployment previews on netlify for branch
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
needs merge & rebase of #1186
Adds basic versions of missing policy mock handlers for viewing the current policies.
/api/v1/policies/terms-of-use/api/v1/policies/terms-of-use/by_active_from/2022-01-01/api/v1/policies/terms-of-use/current/api/v1/policies/terms-of-use/upcoming/api/v1/policies/hosting-policy/api/v1/policies/hosting-policy/current/api/v1/policies/hosting-policy/upcomingnote: due to the current implementation these will need to be adjusted when we add new (current/upcoming) policies. I'm not sure if a more dynamic implementation is worth it.
Compared with the current api routes I noticed in general the coverage of the mocks is not including these endpoints (which is probably fine? as they need different means of testing)
/api/v1/policy_acceptances- requires ability of mocking different data scenarios/api/wiki/profile- could be implemented for a successful store response but re-implementing persistence is as i understand it currenlty not needednot ui relevant:
/api/wiki/deletedWikiMetrics/api/wikiConversionData/api/reusePrototypehttps://phabricator.wikimedia.org/T436954