From 5c5e0bac021244c3b3f0dee34e49b330266cf8c3 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 2 Jul 2018 09:16:48 +0100 Subject: [PATCH] Stop email address wrapping --- app/assets/stylesheets/app.scss | 4 ++++ app/templates/views/register-from-invite.html | 5 ++++- tests/app/main/views/test_accept_invite.py | 6 ++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/app.scss b/app/assets/stylesheets/app.scss index 0e64b1e23..ccc81098c 100644 --- a/app/assets/stylesheets/app.scss +++ b/app/assets/stylesheets/app.scss @@ -257,3 +257,7 @@ details .arrow { outline: 2px solid $black; max-width: 100%; } + +.nowrap { + white-space: nowrap; +} diff --git a/app/templates/views/register-from-invite.html b/app/templates/views/register-from-invite.html index 4051b8086..466b2f276 100644 --- a/app/templates/views/register-from-invite.html +++ b/app/templates/views/register-from-invite.html @@ -11,7 +11,10 @@ Create an account

Create an account

-

Your account will be created with this email: {{invited_user.email_address}}

+

+ Your account will be created with this email address: + {{invited_user.email_address}} +

{{ textbox(form.name, width='3-4') }} {% if invited_user.auth_type == 'sms_auth' %} diff --git a/tests/app/main/views/test_accept_invite.py b/tests/app/main/views/test_accept_invite.py index f8686f9d0..8e5513322 100644 --- a/tests/app/main/views/test_accept_invite.py +++ b/tests/app/main/views/test_accept_invite.py @@ -264,8 +264,10 @@ def test_new_user_accept_invite_calls_api_and_views_registration_page( page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser') assert page.h1.string.strip() == 'Create an account' - email_in_page = page.find('main').find('p') - assert email_in_page.text.strip() == 'Your account will be created with this email: invited_user@test.gov.uk' # noqa + assert normalize_spaces(page.select_one('main p').text) == ( + 'Your account will be created with this email address: ' + 'invited_user@test.gov.uk' + ) form = page.find('form') name = form.find('input', id='name')