''' tests for the common layout and simple (static)'''
from . import testapp
def test_page_welcome_unauthenticated(testapp):
''' test the welcome page for a unauthenticated user '''
testapp.reset()
response = testapp.get('/')
# basic content test
assert 'Ordr | Welcome' in response
assert '' in response
# test that no sections are highlightet
assert '
' not in response
def test_faq_unauthenticated(testapp):
''' test the faq page for a unauthenticated user '''
testapp.reset()
response = testapp.get('/faq')
# basic content test
assert 'Ordr | FAQ' 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' in li_one['class']
assert li_one.find('a').text == 'FAQs'
assert 'active' not in li_two['class']
assert li_two.find('a').text == 'Register'