Header improvements
This commit is contained in:
@@ -172,8 +172,14 @@ def test_logout_revokes_token_and_admin_can_list_plugins():
|
||||
def test_public_and_admin_pages_render_html():
|
||||
root_page = client.get('/')
|
||||
assert 'LinkLog' in root_page.text
|
||||
assert 'class="login-button" href="/login"' in root_page.text
|
||||
assert 'id="auth-session" class="auth-session hidden"' in root_page.text
|
||||
assert 'class="menu-toggle"' in root_page.text
|
||||
assert 'id="auth-menu" class="auth-menu hidden"' in root_page.text
|
||||
assert 'id="auth-home-link" href="/">Home</a>' in root_page.text
|
||||
assert '<a id="auth-username" class="user-name" href="/">' in root_page.text
|
||||
assert 'id="auth-avatar"' not in root_page.text
|
||||
assert 'id="auth-login-button" href="/login"' in root_page.text
|
||||
assert 'id="auth-profile-link" class="hidden"' in root_page.text
|
||||
assert 'id="auth-admin-link" class="hidden"' in root_page.text
|
||||
assert 'logout.js?v=3' in root_page.text
|
||||
assert client.get('/alice').status_code == 200
|
||||
assert client.get('/alice/').status_code == 200
|
||||
@@ -193,8 +199,10 @@ def test_public_and_admin_pages_render_html():
|
||||
assert 'Admin' in admin_page
|
||||
assert 'id="admin-controls" class="hidden"' in admin_page
|
||||
assert 'id="admin-auth-notice" class="auth-notice hidden"' in admin_page
|
||||
assert 'id="admin-login-button" class="login-button" href="/login"' in admin_page
|
||||
assert 'id="auth-session" class="auth-session hidden"' in admin_page
|
||||
assert 'id="auth-menu" class="auth-menu hidden"' in admin_page
|
||||
assert 'id="auth-home-link" href="/">Home</a>' in admin_page
|
||||
assert '<a id="auth-username" class="user-name" href="/">' in admin_page
|
||||
assert 'admin.js?v=3' in admin_page
|
||||
feed_script = client.get('/static/feed.js?v=5').text
|
||||
assert 'if (item.is_owner)' in feed_script
|
||||
|
||||
|
||||
Reference in New Issue
Block a user