Stop email address wrapping

This commit is contained in:
Chris Hill-Scott
2018-07-02 09:16:48 +01:00
parent 3683f99c3b
commit 5c5e0bac02
3 changed files with 12 additions and 3 deletions

View File

@@ -257,3 +257,7 @@ details .arrow {
outline: 2px solid $black;
max-width: 100%;
}
.nowrap {
white-space: nowrap;
}

View File

@@ -11,7 +11,10 @@ Create an account
<div class="grid-row">
<div class="column-two-thirds">
<h1 class="heading-large">Create an account</h1>
<p>Your account will be created with this email: {{invited_user.email_address}}</p>
<p>
Your account will be created with this email address:
<span class="nowrap">{{invited_user.email_address}}</span>
</p>
<form method="post" autocomplete="off">
{{ textbox(form.name, width='3-4') }}
{% if invited_user.auth_type == 'sms_auth' %}

View File

@@ -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')