Add endpoint for new page

This commit is contained in:
Chris Hill-Scott
2019-10-17 16:15:28 +01:00
parent 5494146401
commit bc32315fbe
4 changed files with 25 additions and 8 deletions

View File

@@ -305,6 +305,13 @@ def message_status():
)
@main.route('/features/get-started')
def get_started():
return render_template(
'views/get-started.html'
)
@main.route('/trial-mode')
def trial_mode():
return redirect(url_for('.trial_mode_new'), 301)

View File

@@ -190,6 +190,7 @@ class HeaderNavigation(Navigation):
'forgot_password',
'get_example_csv',
'get_notifications_as_json',
'get_started',
'go_to_dashboard_after_tour',
'inbound_sms_admin',
'inbox',
@@ -504,6 +505,7 @@ class MainNavigation(Navigation):
'forgot_password',
'get_example_csv',
'get_notifications_as_json',
'get_started',
'go_to_dashboard_after_tour',
'how_to_pay',
'inbound_sms_admin',
@@ -728,6 +730,7 @@ class CaseworkNavigation(Navigation):
'forgot_password',
'get_example_csv',
'get_notifications_as_json',
'get_started',
'go_to_dashboard_after_tour',
'how_to_pay',
'inbound_sms_admin',
@@ -1015,6 +1018,7 @@ class OrgNavigation(Navigation):
'forgot_password',
'get_example_csv',
'get_notifications_as_json',
'get_started',
'go_to_dashboard_after_tour',
'how_to_pay',
'inbound_sms_admin',

View File

@@ -28,16 +28,16 @@
<p>Notify is not currently available to charities.</p>
</details>
</li>
<li>
<h2 class="heading-small">Create an account</h2>
{% if not current_user.is_authenticated %}
<p><a href="{{ url_for('.register') }}">Create an account</a> for free and add your first Notify service. When you add a new service, it will start in <a href="{{ url_for('main.trial-mode') }}">trial mode</a>.</p>
<p><a href="{{ url_for('.register') }}">Create an account</a> for free and add your first Notify service. When you add a new service, it will start in <a href="{{ url_for('main.trial_mode_new') }}">trial mode</a>.</p>
{% else %}
<p>Create an account for free and add your first Notify service. When you add a new service, it will start in <a href="{{ url_for('main.trial_mode_new') }}">trial mode</a>.</p>
{% endif %}
</li>
<li>
<h2 class="heading-small">Write some messages</h2>
<p>Add <a href="{{ url_for('main.features', _anchor='templates') }}">message templates</a> with examples of the content you plan to send. You do not need to add letter templates if youre planning to <a href="{{ url_for('main.features_letters', _anchor='upload-letters') }}">upload your own letters</a>.</p>
@@ -45,9 +45,9 @@
<ul class="list list-bullet">
<li><a href="https://www.gov.uk/service-manual/design/sending-emails-and-text-messages#how-to-write-emails-and-text-messages">how to write emails and text messages</a></li>
<li><a href="https://www.gov.uk/service-manual/design/writing-effective-letters">writing effective letters</a></li>
</ul>
</ul>
</li>
<li>
<h2 class="heading-small">Set up your service</h2>
{% if not current_user.is_authenticated %}
@@ -58,14 +58,14 @@
<p>Add <a href="{{ url_for('.manage_users', service_id=current_service.id) }}">team members</a> and check their <a href="{{ url_for('main.features', _anchor='permissions') }}">permissions</a>.</p>
{% endif %}
</li>
<li>
<h2 class="heading-small">API integration (optional)</h2>
<p>Share our <a href="{{ url_for('main.documentation') }}">documentation</a> with your developers to help them set up an API integration.</p>
<p>You only need to do this if youre using the API to send messages automatically, rather than signing in to Notify.</p>
</li>
<li>
<h2 class="heading-small">Start sending messages</h2>
{% if not current_user.is_authenticated %}

View File

@@ -74,7 +74,7 @@ def test_robots(client):
'cookies', 'privacy', 'pricing', 'terms', 'roadmap',
'features', 'documentation', 'security',
'message_status', 'features_email', 'features_sms',
'features_letters', 'how_to_pay',
'features_letters', 'how_to_pay', 'get_started'
])
def test_static_pages(
client_request,
@@ -84,6 +84,12 @@ def test_static_pages(
page = client_request.get('main.{}'.format(view))
assert not page.select_one('meta[name=description]')
client_request.logout()
with client_request.session_transaction() as session:
session['service_id'] = None
session['user_id'] = None
client_request.get('main.{}'.format(view))
@pytest.mark.parametrize('view, expected_view', [
('information_risk_management', 'security'),