mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-26 17:24:23 -04:00
Merge pull request #997 from alphagov/go-live-page
Updated the request to go live page
This commit is contained in:
@@ -346,9 +346,26 @@ class Feedback(Form):
|
|||||||
|
|
||||||
|
|
||||||
class RequestToGoLiveForm(Form):
|
class RequestToGoLiveForm(Form):
|
||||||
usage = TextAreaField(
|
channel = StringField(
|
||||||
'',
|
'Are you sending emails or text messages or both?',
|
||||||
validators=[DataRequired(message="Can’t be empty")]
|
validators=[DataRequired(message='Can’t be empty')]
|
||||||
|
)
|
||||||
|
start_date = StringField(
|
||||||
|
'When will you be ready to start sending messages?',
|
||||||
|
validators=[DataRequired(message='Can’t be empty')]
|
||||||
|
)
|
||||||
|
start_volume = StringField(
|
||||||
|
'How many messages do you expect to send per month to start with? Give an estimate in numbers.',
|
||||||
|
validators=[DataRequired(message='Can’t be empty')]
|
||||||
|
)
|
||||||
|
peak_volume = StringField(
|
||||||
|
'Will the number of messages a month increase and when will that start? Give an estimate.',
|
||||||
|
validators=[DataRequired(message='Can’t be empty')]
|
||||||
|
)
|
||||||
|
upload_or_api = StringField(
|
||||||
|
'Are you uploading a list of contacts that you’re sending your message to, ' +
|
||||||
|
'or are you integrating your system with ours?',
|
||||||
|
validators=[DataRequired(message='Can’t be empty')]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -110,10 +110,19 @@ def service_request_to_go_live(service_id):
|
|||||||
'department_id': current_app.config.get('DESKPRO_DEPT_ID'),
|
'department_id': current_app.config.get('DESKPRO_DEPT_ID'),
|
||||||
'agent_team_id': current_app.config.get('DESKPRO_ASSIGNED_AGENT_TEAM_ID'),
|
'agent_team_id': current_app.config.get('DESKPRO_ASSIGNED_AGENT_TEAM_ID'),
|
||||||
'subject': 'Request to go live',
|
'subject': 'Request to go live',
|
||||||
'message': "On behalf of {} ({})\n\nUsage estimate\n---\n\n{}".format(
|
'message': (
|
||||||
|
'On behalf of {} ({})\n\nExpected usage\n---'
|
||||||
|
'\nChannel: {}\nStart date: {}\nStart volume: {}'
|
||||||
|
'\nPeak volume: {}\nUpload or API: {}'
|
||||||
|
).format(
|
||||||
current_service['name'],
|
current_service['name'],
|
||||||
url_for('main.service_dashboard', service_id=current_service['id'], _external=True),
|
url_for('main.service_dashboard', service_id=current_service['id'], _external=True),
|
||||||
form.usage.data
|
form.channel.data,
|
||||||
|
form.start_date.data,
|
||||||
|
form.start_volume.data,
|
||||||
|
form.peak_volume.data,
|
||||||
|
form.upload_or_api.data
|
||||||
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
headers = {
|
headers = {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{% extends "withnav_template.html" %}
|
{% extends "withnav_template.html" %}
|
||||||
{% from "components/textbox.html" import textbox %}
|
{% from "components/textbox.html" import textbox %}
|
||||||
{% from "components/page-footer.html" import page_footer %}
|
{% from "components/page-footer.html" import page_footer %}
|
||||||
|
{% from "components/banner.html" import banner_wrapper %}
|
||||||
|
|
||||||
{% block page_title %}
|
{% block page_title %}
|
||||||
Request to go live – GOV.UK Notify
|
Request to go live – GOV.UK Notify
|
||||||
@@ -10,49 +11,46 @@
|
|||||||
|
|
||||||
<h1 class="heading-large">Request to go live</h1>
|
<h1 class="heading-large">Request to go live</h1>
|
||||||
|
|
||||||
|
{% call banner_wrapper(type='warning') %}
|
||||||
|
<h2 class="heading-medium">You must accept the GOV.UK Notify data sharing and financial agreement (Memorandum of Understanding) before we can process data for you.</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<a href="{{ url_for('main.feedback') }}">Contact the Notify team</a> to get a copy of the agreement or to find out if your organisation has already accepted it.
|
||||||
|
</p>
|
||||||
|
{% endcall %}
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
You’ll need to:
|
Before you request to go live, make you you’ve:
|
||||||
</p>
|
</p>
|
||||||
<ul class="list list-bullet">
|
<ul class="list list-bullet">
|
||||||
|
<li>accepted our data sharing and financial agreement</li>
|
||||||
|
<li>read our <a href="{{ url_for('.terms') }}">terms of use</a></li>
|
||||||
|
<li>added <a href="{{ url_for('main.manage_users', service_id=current_service.id) }}">team members</a> to your account</li>
|
||||||
<li>
|
<li>
|
||||||
agree to our <a href="{{ url_for('.terms') }}">terms of use</a>
|
specified your reply to email address or text message sender in your
|
||||||
</li>
|
<a href="{{ url_for('main.service_settings', service_id=current_service.id) }}">settings</a> page</li>
|
||||||
<li>
|
<li>
|
||||||
agree to pay for what you use if you send more than 250,000 text messages per year
|
added the templates you want to start with, making sure they follow our
|
||||||
(<a href="{{ url_for("main.pricing") }}">see our pricing</a>)
|
<a href="https://designpatterns.hackpad.com/Notifications-5vuitmNqIjZ" rel="external">design patterns</a>,
|
||||||
</li>
|
<a href="https://www.gov.uk/topic/government-digital-guidance/content-publishing" rel="external">style guide</a>
|
||||||
|
and
|
||||||
|
<a href="https://docs.google.com/document/d/15-OjaEqDBy31uDU7nLZCpYIQOnzSCJR63-cp3cQI9G8" rel="external">information security guidelines</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<form method="post">
|
<form method="post">
|
||||||
|
{{ textbox(form.channel, width='1-1') }}
|
||||||
{{ textbox(
|
{{ textbox(form.start_date, width='1-1') }}
|
||||||
form.usage,
|
{{ textbox(form.start_volume, width='1-1') }}
|
||||||
label='Estimate how many emails and text messages you’ll send each month',
|
{{ textbox(form.peak_volume, width='1-1') }}
|
||||||
hint='If your estimate is likely to change, tell us how ',
|
{{ textbox(form.upload_or_api, width='1-1') }}
|
||||||
width='1-1',
|
|
||||||
rows=5
|
|
||||||
) }}
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
We will:
|
Once you’ve completed the tasks needed to set up, we’ll make your service live. We’ll do this within one working day.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
By requesting to go live you are agreeing to our terms of use.
|
||||||
</p>
|
</p>
|
||||||
<ul class="list list-bullet">
|
|
||||||
<li>
|
|
||||||
check that your templates follow our
|
|
||||||
<a href="https://designpatterns.hackpad.com/Notifications-5vuitmNqIjZ" rel="external">design patterns</a>,
|
|
||||||
<a href="https://www.gov.uk/topic/government-digital-guidance/content-publishing" rel="external">style guide</a>
|
|
||||||
and
|
|
||||||
<a href="https://docs.google.com/document/d/15-OjaEqDBy31uDU7nLZCpYIQOnzSCJR63-cp3cQI9G8" rel="external">information security guidelines</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
check that you have more than one
|
|
||||||
<a href="{{ url_for('main.manage_users', service_id=current_service.id) }}">team member</a>
|
|
||||||
in case you go on holiday
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
make your service live or get back to you within one working day
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
{{ page_footer('Request to go live') }}
|
{{ page_footer('Request to go live') }}
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{% extends "withoutnav_template.html" %}
|
{% extends "withoutnav_template.html" %}
|
||||||
|
{% from "components/banner.html" import banner_wrapper %}
|
||||||
|
|
||||||
{% block page_title %}
|
{% block page_title %}
|
||||||
Terms of use – GOV.UK Notify
|
Terms of use – GOV.UK Notify
|
||||||
@@ -13,6 +14,15 @@ Terms of use – GOV.UK Notify
|
|||||||
Terms of use
|
Terms of use
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
{% call banner_wrapper(type='warning') %}
|
||||||
|
<h2 class="heading-medium">You must accept the GOV.UK Notify data sharing and financial agreement (Memorandum of Understanding) before we can process data for you.</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<a href="{{ url_for('main.feedback') }}">Contact the Notify team</a> to get a copy of the agreement or to find out if your organisation has already accepted it.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
{% endcall %}
|
||||||
|
|
||||||
<p>To accept these terms, you must be the service manager for your service. If you’re not the service manager, you’ll need to invite them.</p>
|
<p>To accept these terms, you must be the service manager for your service. If you’re not the service manager, you’ll need to invite them.</p>
|
||||||
|
|
||||||
<section id="summary">
|
<section id="summary">
|
||||||
@@ -152,7 +162,7 @@ Terms of use – GOV.UK Notify
|
|||||||
<p>When you send messages through GOV.UK Notify, we provide feedback on the status of every text message, email and letter.</p>
|
<p>When you send messages through GOV.UK Notify, we provide feedback on the status of every text message, email and letter.</p>
|
||||||
|
|
||||||
<p>You agree to use our delivery data to check (and potentially remove) bounced email addresses, mobile numbers and postal addresses from your database.</p>
|
<p>You agree to use our delivery data to check (and potentially remove) bounced email addresses, mobile numbers and postal addresses from your database.</p>
|
||||||
|
|
||||||
<p>You agree to ensure your user’s personal data is kept accurate and up to date, in line with Data Protection Act principles.</p>
|
<p>You agree to ensure your user’s personal data is kept accurate and up to date, in line with Data Protection Act principles.</p>
|
||||||
|
|
||||||
<p>If you have consistently high bounce rates, we will investigate and may refuse to accept further messages for delivery. This is to protect delivery rates for other services using GOV.UK Notify.</p>
|
<p>If you have consistently high bounce rates, we will investigate and may refuse to accept further messages for delivery. This is to protect delivery rates for other services using GOV.UK Notify.</p>
|
||||||
@@ -181,7 +191,7 @@ Terms of use – GOV.UK Notify
|
|||||||
<p>You must estimate how many text messages, emails and letters you plan to send each year, including any spikes or seasonal variation.</p>
|
<p>You must estimate how many text messages, emails and letters you plan to send each year, including any spikes or seasonal variation.</p>
|
||||||
|
|
||||||
<p>We will make sure GOV.UK Notify is easily able to handle your estimated sending volume.</p>
|
<p>We will make sure GOV.UK Notify is easily able to handle your estimated sending volume.</p>
|
||||||
|
|
||||||
<h3 class="heading-small" id="we-will-check-your-templates-before-you-can-go-live">
|
<h3 class="heading-small" id="we-will-check-your-templates-before-you-can-go-live">
|
||||||
We’ll check your templates before you can go live
|
We’ll check your templates before you can go live
|
||||||
</h3>
|
</h3>
|
||||||
@@ -195,7 +205,7 @@ Terms of use – GOV.UK Notify
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<p>You can remove your service from GOV.UK Notify at any time. <a href="{{ url_for('main.feedback') }}">Contact us</a> and we’ll delete your account.</p>
|
<p>You can remove your service from GOV.UK Notify at any time. <a href="{{ url_for('main.feedback') }}">Contact us</a> and we’ll delete your account.</p>
|
||||||
|
|
||||||
<p>Any data that you have processed through GOV.UK Notify will be deleted as part of the existing data deletion processes.</p>
|
<p>Any data that you have processed through GOV.UK Notify will be deleted as part of the existing data deletion processes.</p>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -313,7 +313,13 @@ def test_should_redirect_after_request_to_go_live(
|
|||||||
client.login(api_user_active)
|
client.login(api_user_active)
|
||||||
response = client.post(
|
response = client.post(
|
||||||
url_for('main.service_request_to_go_live', service_id='6ce466d0-fd6a-11e5-82f5-e0accb9d11a6'),
|
url_for('main.service_request_to_go_live', service_id='6ce466d0-fd6a-11e5-82f5-e0accb9d11a6'),
|
||||||
data={'usage': "One million messages"},
|
data={
|
||||||
|
'channel': 'Email',
|
||||||
|
'start_date': '01/01/2017',
|
||||||
|
'start_volume': '100,000',
|
||||||
|
'peak_volume': '2,000,000',
|
||||||
|
'upload_or_api': 'api'
|
||||||
|
},
|
||||||
follow_redirects=True
|
follow_redirects=True
|
||||||
)
|
)
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
@@ -323,13 +329,20 @@ def test_should_redirect_after_request_to_go_live(
|
|||||||
'subject': 'Request to go live',
|
'subject': 'Request to go live',
|
||||||
'department_id': ANY,
|
'department_id': ANY,
|
||||||
'agent_team_id': ANY,
|
'agent_team_id': ANY,
|
||||||
'message': 'On behalf of Test Service (http://localhost/services/6ce466d0-fd6a-11e5-82f5-e0accb9d11a6/dashboard)\n\nUsage estimate\n---\n\nOne million messages', # noqa
|
'message': ANY,
|
||||||
'person_name': api_user_active.name,
|
'person_name': api_user_active.name,
|
||||||
'person_email': api_user_active.email_address
|
'person_email': api_user_active.email_address
|
||||||
},
|
},
|
||||||
headers=ANY
|
headers=ANY
|
||||||
)
|
)
|
||||||
|
|
||||||
|
returned_message = mock_post.call_args[1]['data']['message']
|
||||||
|
assert 'Email' in returned_message
|
||||||
|
assert '01/01/2017' in returned_message
|
||||||
|
assert '100,000' in returned_message
|
||||||
|
assert '2,000,000' in returned_message
|
||||||
|
assert 'api' in returned_message
|
||||||
|
|
||||||
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
||||||
flash_banner = page.find('div', class_='banner-default').string.strip()
|
flash_banner = page.find('div', class_='banner-default').string.strip()
|
||||||
h1 = page.find('h1').string.strip()
|
h1 = page.find('h1').string.strip()
|
||||||
@@ -362,7 +375,13 @@ def test_log_error_on_request_to_go_live(
|
|||||||
with pytest.raises(InternalServerError):
|
with pytest.raises(InternalServerError):
|
||||||
resp = client.post(
|
resp = client.post(
|
||||||
url_for('main.service_request_to_go_live', service_id='6ce466d0-fd6a-11e5-82f5-e0accb9d11a6'),
|
url_for('main.service_request_to_go_live', service_id='6ce466d0-fd6a-11e5-82f5-e0accb9d11a6'),
|
||||||
data={'usage': 'blah'}
|
data={
|
||||||
|
'channel': 'channel',
|
||||||
|
'start_date': 'start_date',
|
||||||
|
'start_volume': 'start_volume',
|
||||||
|
'peak_volume': 'peak_volume',
|
||||||
|
'upload_or_api': 'upload_or_api'
|
||||||
|
}
|
||||||
)
|
)
|
||||||
mock_logger.assert_called_with(
|
mock_logger.assert_called_with(
|
||||||
"Deskpro create ticket request failed with {} '{}'".format(mock_post().status_code, mock_post().json())
|
"Deskpro create ticket request failed with {} '{}'".format(mock_post().status_code, mock_post().json())
|
||||||
|
|||||||
Reference in New Issue
Block a user