Skip to content

msw: add policy mock handlers - #1199

Open
deer-wmde wants to merge 26 commits into
mainfrom
de/msw-policies
Open

msw: add policy mock handlers#1199
deer-wmde wants to merge 26 commits into
mainfrom
de/msw-policies

Conversation

@deer-wmde

@deer-wmde deer-wmde commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Note

needs merge & rebase of #1186

Adds basic versions of missing policy mock handlers for viewing the current policies.

  • GET /api/v1/policies/terms-of-use
  • GET /api/v1/policies/terms-of-use/by_active_from/2022-01-01
  • GET /api/v1/policies/terms-of-use/current
  • GET /api/v1/policies/terms-of-use/upcoming
  • GET /api/v1/policies/hosting-policy
  • GET /api/v1/policies/hosting-policy/current
  • GET /api/v1/policies/hosting-policy/upcoming

note: 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 needed

not ui relevant:

  • /api/wiki/deletedWikiMetrics
  • /api/wikiConversionData
  • /api/reusePrototype

https://phabricator.wikimedia.org/T436954

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Deployment previews on netlify for branch refs/pull/1199/merge will be at the following locations (when build is done):

@deer-wmde
deer-wmde marked this pull request as ready for review September 4, 2026 14:36
@deer-wmde
deer-wmde changed the base branch from main to ui_msw_login September 4, 2026 15:24
@deer-wmde
deer-wmde changed the base branch from ui_msw_login to main September 4, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant