Show confirmation after pressing big green button

There’s no immediate feedback with letter jobs, unlike email or text
messages jobs where you see the numbers starting to tick over straight
away.

We need to reassure the user that the thing they asked us to do (send
letters) is underway. ‘Printing’ feels like the natural first state of
the letter-making process. So this commit adds a banner to tell the
user that printing is the thing that’s happening.
This commit is contained in:
Chris Hill-Scott
2017-07-13 11:28:37 +01:00
parent ad897cd820
commit 3950c6938d
5 changed files with 61 additions and 10 deletions

View File

@@ -174,6 +174,10 @@ def test_should_show_letter_job(
)
assert normalize_spaces(page.h1.text) == 'thisisatest.csv'
assert normalize_spaces(page.select('p.bottom-gutter')[0].text) == (
'Sent by Test User on 1 January at 11:09am'
)
assert page.select('.banner-default-with-tick') == []
assert normalize_spaces(page.select('tbody tr')[0].text) == (
'07123456789 template content'
)
@@ -203,6 +207,28 @@ def test_should_show_letter_job(
)
@freeze_time("2016-01-01 11:09:00.061258")
def test_should_show_letter_job_with_banner_after_sending(
client_request,
mock_get_service_letter_template,
mock_get_job,
mock_get_notifications,
fake_uuid,
):
page = client_request.get(
'main.view_job',
service_id=SERVICE_ONE_ID,
job_id=fake_uuid,
just_sent='yes',
)
assert page.select('p.bottom-gutter') == []
assert normalize_spaces(page.select('.banner-default-with-tick')[0].text) == (
'Weve started printing your letters'
)
@freeze_time("2016-01-01T00:00:00.061258")
def test_should_show_scheduled_job(
logged_in_client,

View File

@@ -1144,6 +1144,7 @@ def test_can_start_letters_job(
data={}
)
assert response.status_code == 302
assert 'just_sent=yes' in response.location
@pytest.mark.parametrize('filetype', ['pdf', 'png'])