mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Merge pull request #2068 from alphagov/2fa-input
Improve 2fa code input
This commit is contained in:
@@ -17,7 +17,15 @@ def test_should_render_two_factor_page(
|
||||
'email': api_user_active.email_address}
|
||||
response = client.get(url_for('main.two_factor'))
|
||||
assert response.status_code == 200
|
||||
assert '''We’ve sent you a text message with a security code.''' in response.get_data(as_text=True)
|
||||
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
||||
assert page.select_one('main p').text.strip() == (
|
||||
'We’ve sent you a text message with a security code.'
|
||||
)
|
||||
assert page.select_one('label').text.strip(
|
||||
'Text message code'
|
||||
)
|
||||
assert page.select_one('input')['type'] == 'tel'
|
||||
assert page.select_one('input')['pattern'] == '[0-9]*'
|
||||
|
||||
|
||||
def test_should_login_user_and_should_redirect_to_next_url(
|
||||
|
||||
Reference in New Issue
Block a user