mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-04-28 16:29:54 -05:00
f54ab9934f
Backend: add Black/isort/Flake8 configs and .editorconfig; switch health/readiness to locale-based time. Fix service worker asset list; add smoke test. Admin scopes UI: add read:* and write:* wildcards; add granular scopes for invoices, expenses, payments, mileage, per diem, budget alerts, calendar, comments, recurring invoices. API v1: add endpoints for invoices, expenses, payments, mileage, per diem (+rates), budget alerts, calendar, kanban, saved filters, time entry templates, comments, recurring invoices, credit notes, client notes (paginated), project costs (paginated), currencies, exchange rates, favorites, audit logs, activities, and invoice PDF/templates (admin). Extend /api/v1/info with all resources. No schema changes. Tests: add coverage for new endpoints (CRUD/list/pagination) and service worker route smoke test.
15 lines
480 B
Python
15 lines
480 B
Python
import re
|
|
|
|
|
|
def test_service_worker_serves_assets(client):
|
|
resp = client.get('/service-worker.js')
|
|
assert resp.status_code == 200
|
|
text = resp.get_data(as_text=True)
|
|
# Ensure JS content type and presence of cache list with known asset
|
|
assert 'application/javascript' in (resp.headers.get('Content-Type') or '')
|
|
assert 'dist/output.css' in text
|
|
assert 'enhanced-ui.js' in text
|
|
# Basic sanity: ASSETS array present
|
|
assert 'const ASSETS=' in text
|
|
|