mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -04:00
Add endpoint for new page
This commit is contained in:
@@ -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')
|
@main.route('/trial-mode')
|
||||||
def trial_mode():
|
def trial_mode():
|
||||||
return redirect(url_for('.trial_mode_new'), 301)
|
return redirect(url_for('.trial_mode_new'), 301)
|
||||||
|
|||||||
@@ -190,6 +190,7 @@ class HeaderNavigation(Navigation):
|
|||||||
'forgot_password',
|
'forgot_password',
|
||||||
'get_example_csv',
|
'get_example_csv',
|
||||||
'get_notifications_as_json',
|
'get_notifications_as_json',
|
||||||
|
'get_started',
|
||||||
'go_to_dashboard_after_tour',
|
'go_to_dashboard_after_tour',
|
||||||
'inbound_sms_admin',
|
'inbound_sms_admin',
|
||||||
'inbox',
|
'inbox',
|
||||||
@@ -504,6 +505,7 @@ class MainNavigation(Navigation):
|
|||||||
'forgot_password',
|
'forgot_password',
|
||||||
'get_example_csv',
|
'get_example_csv',
|
||||||
'get_notifications_as_json',
|
'get_notifications_as_json',
|
||||||
|
'get_started',
|
||||||
'go_to_dashboard_after_tour',
|
'go_to_dashboard_after_tour',
|
||||||
'how_to_pay',
|
'how_to_pay',
|
||||||
'inbound_sms_admin',
|
'inbound_sms_admin',
|
||||||
@@ -728,6 +730,7 @@ class CaseworkNavigation(Navigation):
|
|||||||
'forgot_password',
|
'forgot_password',
|
||||||
'get_example_csv',
|
'get_example_csv',
|
||||||
'get_notifications_as_json',
|
'get_notifications_as_json',
|
||||||
|
'get_started',
|
||||||
'go_to_dashboard_after_tour',
|
'go_to_dashboard_after_tour',
|
||||||
'how_to_pay',
|
'how_to_pay',
|
||||||
'inbound_sms_admin',
|
'inbound_sms_admin',
|
||||||
@@ -1015,6 +1018,7 @@ class OrgNavigation(Navigation):
|
|||||||
'forgot_password',
|
'forgot_password',
|
||||||
'get_example_csv',
|
'get_example_csv',
|
||||||
'get_notifications_as_json',
|
'get_notifications_as_json',
|
||||||
|
'get_started',
|
||||||
'go_to_dashboard_after_tour',
|
'go_to_dashboard_after_tour',
|
||||||
'how_to_pay',
|
'how_to_pay',
|
||||||
'inbound_sms_admin',
|
'inbound_sms_admin',
|
||||||
|
|||||||
@@ -28,16 +28,16 @@
|
|||||||
<p>Notify is not currently available to charities.</p>
|
<p>Notify is not currently available to charities.</p>
|
||||||
</details>
|
</details>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<h2 class="heading-small">Create an account</h2>
|
<h2 class="heading-small">Create an account</h2>
|
||||||
{% if not current_user.is_authenticated %}
|
{% 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 %}
|
{% 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>
|
<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 %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<h2 class="heading-small">Write some messages</h2>
|
<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 you’re planning to <a href="{{ url_for('main.features_letters', _anchor='upload-letters') }}">upload your own letters</a>.</p>
|
<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 you’re 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">
|
<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/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>
|
<li><a href="https://www.gov.uk/service-manual/design/writing-effective-letters">writing effective letters</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<h2 class="heading-small">Set up your service</h2>
|
<h2 class="heading-small">Set up your service</h2>
|
||||||
{% if not current_user.is_authenticated %}
|
{% 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>
|
<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 %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<h2 class="heading-small">API integration (optional)</h2>
|
<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>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 you’re using the API to send messages automatically, rather than signing in to Notify.</p>
|
<p>You only need to do this if you’re using the API to send messages automatically, rather than signing in to Notify.</p>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<h2 class="heading-small">Start sending messages</h2>
|
<h2 class="heading-small">Start sending messages</h2>
|
||||||
{% if not current_user.is_authenticated %}
|
{% if not current_user.is_authenticated %}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ def test_robots(client):
|
|||||||
'cookies', 'privacy', 'pricing', 'terms', 'roadmap',
|
'cookies', 'privacy', 'pricing', 'terms', 'roadmap',
|
||||||
'features', 'documentation', 'security',
|
'features', 'documentation', 'security',
|
||||||
'message_status', 'features_email', 'features_sms',
|
'message_status', 'features_email', 'features_sms',
|
||||||
'features_letters', 'how_to_pay',
|
'features_letters', 'how_to_pay', 'get_started'
|
||||||
])
|
])
|
||||||
def test_static_pages(
|
def test_static_pages(
|
||||||
client_request,
|
client_request,
|
||||||
@@ -84,6 +84,12 @@ def test_static_pages(
|
|||||||
page = client_request.get('main.{}'.format(view))
|
page = client_request.get('main.{}'.format(view))
|
||||||
assert not page.select_one('meta[name=description]')
|
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', [
|
@pytest.mark.parametrize('view, expected_view', [
|
||||||
('information_risk_management', 'security'),
|
('information_risk_management', 'security'),
|
||||||
|
|||||||
Reference in New Issue
Block a user