alphagov / government-frontend

Serves government pages on GOV.UK
https://docs.publishing.service.gov.uk/apps/government-frontend.html
MIT License
54 stars 17 forks source link

Unsubscribe button on document collection pages #3409

Closed hannako closed 1 week ago

hannako commented 2 weeks ago

What

Fix two issues with the email subscription signup process on Document Collection pages.

First commit: Display a flash message to confirm subscription.

This should have been added in https://github.com/alphagov/government-frontend/pull/2535

Before After
Screenshot 2024-11-12 at 22 28 09 Screenshot 2024-11-12 at 22 26 38

Second commit: Fix unsubscribe button

Allow users with a gov.uk account to unsubscribe from a document collection via the single page notification button. See commit message for full explanation and links to documentation.

Trello

KludgeKML commented 2 weeks ago

Commit 3: I kind of forget what the equivalence is, but I think controller tests are the olde-world version of request tests, which is probably reasonable for this test case (we're not testing the actual user interaction in the test, which would make it an integration/system test, just what is returned for a specific request - ie given an account or not, does the signup control in the returned page point to the account or magic link endpoint?)