From 9ee42880e9100cd184086cad793c610adc6a9b28 Mon Sep 17 00:00:00 2001 From: Holger Frey Date: Tue, 17 Oct 2017 11:14:34 +0200 Subject: [PATCH] added login form --- ordr2/templates/layout.jinja2 | 10 +++++++++- tests/_functional/account.py | 1 - tests/_functional/layout_and_pages.py | 15 +++++++++++++-- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/ordr2/templates/layout.jinja2 b/ordr2/templates/layout.jinja2 index 795c4b0..f65df01 100644 --- a/ordr2/templates/layout.jinja2 +++ b/ordr2/templates/layout.jinja2 @@ -36,7 +36,7 @@ - + + + +
+ + + + +
{% endif %} diff --git a/tests/_functional/account.py b/tests/_functional/account.py index 9619fc8..c0b6ded 100644 --- a/tests/_functional/account.py +++ b/tests/_functional/account.py @@ -11,7 +11,6 @@ def test_account_register_unauthenticated(testapp): # basic content test assert 'Ordr | Account Registration' in response - assert '' in response # test the main nav section links and highlighting li_one, li_two = response.html.find_all('li', class_='nav-item') assert 'active' not in li_one['class'] diff --git a/tests/_functional/layout_and_pages.py b/tests/_functional/layout_and_pages.py index 3c9777f..a01db4d 100644 --- a/tests/_functional/layout_and_pages.py +++ b/tests/_functional/layout_and_pages.py @@ -3,6 +3,19 @@ from . import testapp +def test_layout_unauthenticated_user(testapp): + ''' test the layout template elements for unauthenticated users + + The '/faq' path is used; '/' will redirect on authenticated users + ''' + testapp.reset() + + response = testapp.get('/faq') + + assert '' in response + assert 'class="login-form' in response + + def test_page_welcome_unauthenticated(testapp): ''' test the welcome page for a unauthenticated user ''' testapp.reset() @@ -11,7 +24,6 @@ def test_page_welcome_unauthenticated(testapp): # basic content test assert 'Ordr | Welcome' in response - assert '' in response # test that no sections are highlightet assert '