Make the broadcast flow talk to the API

This commit removes the code the puts areas into the session and instead
creates and then updates a draft broadcast in the database.

This is so we can avoid session-related bugs, and potentially having a
large session when we start adding personalisation etc.

Once a broadcast is ready to go it is set to `broadcasting` straight
away with no approval. We’ll revisit this as we learn more about how
users might want to manage who can create and approve broadcasts.

The tests are a bit light in terms of checking what’s on the page, but
clicking through the pages is probably good enough for now.
This commit is contained in:
Chris Hill-Scott
2020-07-09 10:33:50 +01:00
parent 2c33325dc2
commit effe24893e
12 changed files with 436 additions and 89 deletions

View File

@@ -696,6 +696,7 @@ def test_view_broadcast_template(
('Prepare broadcast', url_for(
'.broadcast',
service_id=SERVICE_ONE_ID,
template_id=fake_uuid,
)),
('Edit', url_for(
'.edit_service_template',