alphagov / whitehall

Publishes government content on GOV.UK
https://docs.publishing.service.gov.uk/apps/whitehall.html
MIT License
896 stars 194 forks source link

Allow overriding government attempt 3 part 2 #9389

Closed ryanb-gds closed 2 months ago

ryanb-gds commented 2 months ago

Depends on #9388

This is hidden behind a feature flag so we can safely merge even though we haven't had sign off from content on the implementation.

I separated the history mode fields into a view component in order to be able to test the various conditions from a component test rather than a view test.

Annoyingly, because the conditional checkbox behaviour relies on Javascript, the best we can do to test that is working is assert that the government selection element is wrapped in a conditional div belonging to the political checkbox.

Trello: https://trello.com/c/II8jgMR7