Red theme and regression

This commit is contained in:
2026-08-27 22:22:41 +02:00
parent 3661d0b4b7
commit 9494d2b119
7 changed files with 39 additions and 3 deletions
+1
View File
@@ -16,6 +16,7 @@ THEMES = {
'dracula': {'label': 'Dracula', 'description': 'A vivid dark theme with high-contrast accents.'},
'nord': {'label': 'Nord', 'description': 'A cool, muted blue-gray theme.'},
'solarized': {'label': 'Solarized', 'description': 'A balanced theme available in a light style.'},
'red': {'label': 'Red', 'description': 'A warm crimson theme with high-contrast surfaces.'},
}
DEFAULT_ENABLED_THEMES = tuple(THEMES)
+3 -2
View File
@@ -150,10 +150,10 @@ def test_configuration_requires_authentication_and_admin_role():
def test_admin_can_select_multiple_themes():
headers = login_headers()
response = client.put('/api/admin/themes', headers=headers, json={
'themes': ['plain-day', 'plain-night', 'latte', 'frappe', 'macchiato', 'mocha', 'dracula', 'nord', 'solarized'],
'themes': ['plain-day', 'plain-night', 'latte', 'frappe', 'macchiato', 'mocha', 'dracula', 'nord', 'solarized', 'red'],
})
assert response.status_code == 200
assert response.json()['enabled'] == ['plain-day', 'plain-night', 'latte', 'frappe', 'macchiato', 'mocha', 'dracula', 'nord', 'solarized']
assert response.json()['enabled'] == ['plain-day', 'plain-night', 'latte', 'frappe', 'macchiato', 'mocha', 'dracula', 'nord', 'solarized', 'red']
public_response = client.get('/api/public/themes')
assert public_response.status_code == 200
assert [theme['id'] for theme in public_response.json()] == response.json()['enabled']
@@ -792,6 +792,7 @@ def test_public_and_admin_pages_render_html():
assert 'alice' in user_page
assert 'data-user-filter="alice"' in user_page
assert 'profile-summary' in user_page
assert '<div class="header-tools">' in user_page
feed_script = TestClient(app).get('/static/feed.js?v=4').text
assert 'window.location.assign(selectedUser ? `/${encodeURIComponent(selectedUser)}/` : \'/\')' in feed_script
assert client.get('/login').status_code == 200