mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 18:37:33 -04:00
Merge pull request #2575 from alphagov/remove-commas-volumes
Strip commas from estimated volumes
This commit is contained in:
@@ -176,9 +176,9 @@ def submit_request_to_go_live(service_id):
|
|||||||
'{user_email}, '
|
'{user_email}, '
|
||||||
'-, '
|
'-, '
|
||||||
'{date}, '
|
'{date}, '
|
||||||
'{volume_sms}, '
|
'{volume_sms_normalised}, '
|
||||||
'{volume_email}, '
|
'{volume_email_normalised}, '
|
||||||
'{volume_letter}'
|
'{volume_letter_normalised}'
|
||||||
).format(
|
).format(
|
||||||
service_name=current_service.name,
|
service_name=current_service.name,
|
||||||
service_dashboard=url_for('main.service_dashboard', service_id=current_service.id, _external=True),
|
service_dashboard=url_for('main.service_dashboard', service_id=current_service.id, _external=True),
|
||||||
@@ -186,8 +186,11 @@ def submit_request_to_go_live(service_id):
|
|||||||
agreement=AgreementInfo.from_current_user().as_human_readable,
|
agreement=AgreementInfo.from_current_user().as_human_readable,
|
||||||
checklist=current_service.go_live_checklist_completed_as_yes_no,
|
checklist=current_service.go_live_checklist_completed_as_yes_no,
|
||||||
volume_email=form.volume_email.data,
|
volume_email=form.volume_email.data,
|
||||||
|
volume_email_normalised=form.volume_email.data.replace(',', ''),
|
||||||
volume_sms=form.volume_sms.data,
|
volume_sms=form.volume_sms.data,
|
||||||
|
volume_sms_normalised=form.volume_sms.data.replace(',', ''),
|
||||||
volume_letter=form.volume_letter.data,
|
volume_letter=form.volume_letter.data,
|
||||||
|
volume_letter_normalised=form.volume_letter.data.replace(',', ''),
|
||||||
research_consent=form.research_consent.data.title(),
|
research_consent=form.research_consent.data.title(),
|
||||||
service_id=current_service.id,
|
service_id=current_service.id,
|
||||||
organisation=AgreementInfo.from_current_user().owner,
|
organisation=AgreementInfo.from_current_user().owner,
|
||||||
|
|||||||
@@ -862,9 +862,9 @@ def test_should_redirect_after_request_to_go_live(
|
|||||||
'main.submit_request_to_go_live',
|
'main.submit_request_to_go_live',
|
||||||
service_id=SERVICE_ONE_ID,
|
service_id=SERVICE_ONE_ID,
|
||||||
_data={
|
_data={
|
||||||
'volume_email': '111',
|
'volume_email': '111,111',
|
||||||
'volume_sms': '222',
|
'volume_sms': '222,222',
|
||||||
'volume_letter': '333',
|
'volume_letter': '333,333',
|
||||||
'research_consent': 'yes',
|
'research_consent': 'yes',
|
||||||
},
|
},
|
||||||
_follow_redirects=True
|
_follow_redirects=True
|
||||||
@@ -891,13 +891,13 @@ def test_should_redirect_after_request_to_go_live(
|
|||||||
'Organisation type: Central\n'
|
'Organisation type: Central\n'
|
||||||
'Agreement signed: Can’t tell (domain is user.gov.uk)\n'
|
'Agreement signed: Can’t tell (domain is user.gov.uk)\n'
|
||||||
'Checklist completed: No\n'
|
'Checklist completed: No\n'
|
||||||
'Emails in next year: 111\n'
|
'Emails in next year: 111,111\n'
|
||||||
'Text messages in next year: 222\n'
|
'Text messages in next year: 222,222\n'
|
||||||
'Letters in next year: 333\n'
|
'Letters in next year: 333,333\n'
|
||||||
'Consent to research: Yes\n'
|
'Consent to research: Yes\n'
|
||||||
'\n'
|
'\n'
|
||||||
'---\n'
|
'---\n'
|
||||||
'{}, None, service one, Test User, test@user.gov.uk, -, 21/12/2012, 222, 111, 333'
|
'{}, None, service one, Test User, test@user.gov.uk, -, 21/12/2012, 222222, 111111, 333333'
|
||||||
).format(SERVICE_ONE_ID, SERVICE_ONE_ID)
|
).format(SERVICE_ONE_ID, SERVICE_ONE_ID)
|
||||||
|
|
||||||
assert normalize_spaces(page.select_one('.banner-default').text) == (
|
assert normalize_spaces(page.select_one('.banner-default').text) == (
|
||||||
|
|||||||
Reference in New Issue
Block a user