mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 05:59:44 -04:00
Hide the recipient table on send yourself a test
Send yourself a test is: - a good way of explaining how placeholders work - a useful tool for checking your work before you send a big batch It’s not a good way of learning about the relationship between columns in a spreadsheet and placeholders. The ‘example spreadsheet’ thing is good at making that connection. The table on this page isn’t, because it doesn’t _feel_ like you’re making a spreadsheet with the send yourself a test feature (even though that’s what you’re doing in the background). This will be even more the case when we stop putting the input boxes horizontally on one page. By removing the table from this page it makes the page simpler, which allows people to focus on the important thing – what’s happening to their message.
This commit is contained in:
@@ -282,6 +282,36 @@ def test_upload_valid_csv_shows_file_contents(
|
||||
assert normalize_spaces(str(page.select('table tbody td')[index])) == cell
|
||||
|
||||
|
||||
def test_send_test_doesnt_show_file_contents(
|
||||
logged_in_client,
|
||||
mocker,
|
||||
mock_get_service_template_with_placeholders,
|
||||
mock_s3_upload,
|
||||
mock_get_users_by_service,
|
||||
mock_get_detailed_service_for_today,
|
||||
service_one,
|
||||
fake_uuid,
|
||||
):
|
||||
|
||||
mocker.patch('app.main.views.send.s3download', return_value="""
|
||||
phone number,name,thing,thing,thing
|
||||
07700900986, Jo, foo, foo, foo
|
||||
""")
|
||||
|
||||
response = logged_in_client.post(
|
||||
url_for('main.send_test', service_id=service_one['id'], template_id=fake_uuid),
|
||||
data={},
|
||||
follow_redirects=True,
|
||||
)
|
||||
|
||||
assert response.status_code == 200
|
||||
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
||||
assert page.select('h1')[0].text.strip() == 'Preview of Two week reminder'
|
||||
assert len(page.select('table')) == 0
|
||||
assert len(page.select('.banner-dangerous')) == 0
|
||||
assert page.select('input[type=submit]')[0]['value'].strip() == 'Send 1 text message'
|
||||
|
||||
|
||||
def test_send_test_sms_message(
|
||||
logged_in_client,
|
||||
mocker,
|
||||
|
||||
Reference in New Issue
Block a user