Files
TimeTracker/tests/test_ui_quick_wins.py
Dries Peeters 3c3faf13d4 feat: Implement Tailwind CSS UI redesign across application
Migrate frontend from custom CSS to Tailwind CSS framework with comprehensive
template updates and improved component structure.

Breaking Changes:
- Remove legacy CSS files (base.css, calendar.css, ui.css, etc.)
- Replace with Tailwind-based styling system

New Features:
- Add Tailwind CSS configuration with PostCSS pipeline
- Create new template components for admin, clients, invoices, projects, reports
- Add form-bridge.css for smooth transition between legacy and Tailwind styles
- Add default avatar SVG asset
- Implement Tailwind-based kanban board template
- Add comprehensive UI quick wins documentation

Infrastructure:
- Add package.json with Tailwind dependencies
- Configure PostCSS and Tailwind build pipeline
- Update .gitignore for Node modules and build artifacts

Testing:
- Add template rendering tests (test_tasks_templates.py)
- Add UI component tests (test_ui_quick_wins.py)

Templates Added:
- Admin: dashboard, settings, system info, user management
- Clients: list and detail views
- Invoices: full CRUD templates with payment recording
- Projects: list, detail, and Tailwind kanban views
- Reports: comprehensive reporting templates
- Timer: manual entry interface

This commit represents the first phase of the UI redesign initiative,
maintaining backward compatibility where needed while establishing the
foundation for modern, responsive interfaces.
2025-10-17 11:51:36 +02:00

37 lines
1.1 KiB
Python

import pytest
@pytest.mark.smoke
@pytest.mark.routes
def test_base_layout_has_skip_link(authenticated_client):
response = authenticated_client.get('/dashboard')
assert response.status_code == 200
html = response.get_data(as_text=True)
assert 'Skip to content' in html
assert 'href="#mainContentAnchor"' in html
assert 'id="mainContentAnchor"' in html
@pytest.mark.smoke
@pytest.mark.routes
def test_login_has_primary_button_and_user_icon(client):
response = client.get('/login')
assert response.status_code == 200
html = response.get_data(as_text=True)
assert 'class="btn btn-primary' in html or 'class="btn btn-primary"' in html
assert 'fa-user' in html
assert 'id="username"' in html
@pytest.mark.smoke
@pytest.mark.routes
def test_tasks_table_has_sticky_and_zebra(authenticated_client):
response = authenticated_client.get('/tasks')
assert response.status_code == 200
html = response.get_data(as_text=True)
assert 'class="table table-zebra' in html or 'class="table table-zebra"' in html
# numeric alignment utility present on Due/Progress columns
assert 'table-number' in html