Show a tour when users first create a service

This commit adds a 3 screen tour, similar to those used on GOV.UK Verify
and Passports.

We guerilla tested this on Friday, and it really helped users to build a
mental model of how Notify works, so that when they’re playing around
with it they have a greater sense of what they’re aiming to do. This
makes concepts like templates and placeholders click more quickly.

https://www.pivotaltracker.com/story/show/116710119
This commit is contained in:
Chris Hill-Scott
2016-04-01 10:54:55 +01:00
parent 5f9605d605
commit 5d873bdc45
18 changed files with 246 additions and 69 deletions

View File

@@ -26,7 +26,7 @@ def test_should_add_service_and_redirect_to_next_page(app_,
url_for('main.add_service'),
data={'name': 'testing the post'})
assert response.status_code == 302
assert response.location == url_for('main.service_dashboard', service_id=101, _external=True)
assert response.location == url_for('main.tour', service_id=101, page=1, _external=True)
assert mock_get_services.called
mock_create_service.asset_called_once_with(service_name='testing the post',
active=False,

View File

@@ -0,0 +1,19 @@
import pytest
from flask import url_for
import app
@pytest.mark.parametrize("page", range(1, 5))
def test_should_render_tour_pages(
app_,
api_user_active,
mocker,
page
):
with app_.test_request_context():
with app_.test_client() as client:
client.login(api_user_active, mocker)
response = client.get(url_for('main.tour', service_id=101, page=page))
assert response.status_code == 200
assert 'Next' in response.get_data(as_text=True)