mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-01-03 02:00:55 -06:00
Update tests
This commit is contained in:
@@ -217,7 +217,26 @@
|
||||
</span>
|
||||
</div>
|
||||
<div id="activityTimeline" class="activity-timeline">
|
||||
<!-- Activity items will be loaded here -->
|
||||
{% if recent_activities %}
|
||||
{% for activity in recent_activities %}
|
||||
<div class="activity-timeline-item">
|
||||
<div class="flex items-start gap-3">
|
||||
<div class="flex-shrink-0 w-8 h-8 rounded-full bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center">
|
||||
<i class="fas fa-circle text-sm text-blue-600 dark:text-blue-400"></i>
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
<p class="text-sm text-text-light dark:text-text-dark">{{ activity.description or 'Activity' }}</p>
|
||||
<p class="text-xs text-text-muted-light dark:text-text-muted-dark">{{ activity.created_at|local_datetime_short }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="text-center py-8 text-text-muted-light dark:text-text-muted-dark">
|
||||
<i class="fas fa-inbox text-4xl mb-4 opacity-50"></i>
|
||||
<p>No recent activity</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -22,7 +22,7 @@ def get_user_friendly_message(status_code, error_description=None):
|
||||
},
|
||||
404: {
|
||||
'title': 'Page Not Found',
|
||||
'message': 'The page or resource you\'re looking for doesn\'t exist.',
|
||||
'message': 'The page or resource you\'re looking for was not found.',
|
||||
'recovery': ['Go to Dashboard', 'Go Back']
|
||||
},
|
||||
409: {
|
||||
|
||||
@@ -142,9 +142,9 @@ def test_graceful_degradation():
|
||||
|
||||
@pytest.mark.unit
|
||||
@pytest.mark.error_handling
|
||||
def test_error_handling_js_loaded(client):
|
||||
def test_error_handling_js_loaded(authenticated_client):
|
||||
"""Test that error handling JavaScript is loaded in base template"""
|
||||
response = client.get('/login')
|
||||
response = authenticated_client.get('/dashboard')
|
||||
assert response.status_code == 200
|
||||
# Check that error-handling-enhanced.js is included
|
||||
assert b'error-handling-enhanced.js' in response.data
|
||||
|
||||
@@ -22,9 +22,9 @@ def test_onboarding_manager_exists():
|
||||
|
||||
@pytest.mark.unit
|
||||
@pytest.mark.onboarding
|
||||
def test_onboarding_js_loaded(client):
|
||||
def test_onboarding_js_loaded(authenticated_client):
|
||||
"""Test that onboarding JavaScript is loaded in base template"""
|
||||
response = client.get('/login')
|
||||
response = authenticated_client.get('/dashboard')
|
||||
assert response.status_code == 200
|
||||
# Check that onboarding-enhanced.js is included
|
||||
assert b'onboarding-enhanced.js' in response.data
|
||||
@@ -113,9 +113,9 @@ def test_onboarding_files_exist():
|
||||
|
||||
@pytest.mark.unit
|
||||
@pytest.mark.onboarding
|
||||
def test_onboarding_base_template_integration(client):
|
||||
def test_onboarding_base_template_integration(authenticated_client):
|
||||
"""Test that onboarding scripts are included in base template"""
|
||||
response = client.get('/login')
|
||||
response = authenticated_client.get('/dashboard')
|
||||
assert response.status_code == 200
|
||||
html = response.data.decode('utf-8')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user