refactor: enhance TimerPage layout and functionality; update theme and tokens for improved design consistency
- Refactored TimerPage component to improve layout and user experience. - Updated theme configuration to utilize design tokens for better maintainability. - Introduced new tokens for colors and typography to align with design principles. - Simplified state management and improved timer functionality. - Enhanced accessibility and responsiveness of UI elements.
This commit is contained in:
84 files changed
+4501
-2682
No files matched your search
@@ -24,9 +24,6 @@ def test_a_whole_pomodoro_through_the_api(client):
|
||||
assert done["finished"]["status"] == "completed"
|
||||
assert done["completed_today"] == 1
|
||||
|
||||
marked = client.post(f"/api/tasks/{task['id']}/done", json={"done": True}).json()
|
||||
assert marked["task"]["is_done"] is True
|
||||
|
||||
report = client.get("/api/reports/daily").json()
|
||||
assert report["report"]["metrics"]["pomodoros"] == 1
|
||||
assert "Daily report" in report["telegram_preview"]
|
||||
@@ -37,6 +34,18 @@ def test_timer_errors_are_400_not_500(client):
|
||||
assert client.post("/api/timer/complete", json={}).status_code == 400
|
||||
|
||||
|
||||
def test_tasks_cannot_be_ticked_off_here(client):
|
||||
"""Completion belongs to Jira / Todoist / Google — we only notice it.
|
||||
|
||||
405 rather than 404 because the SPA catch-all claims unknown paths for GET;
|
||||
either way there is no way to close a task through the API.
|
||||
"""
|
||||
task = client.post("/api/tasks", json={"title": "Not yours to close"}).json()
|
||||
response = client.post(f"/api/tasks/{task['id']}/done", json={"done": True})
|
||||
assert response.status_code in (404, 405)
|
||||
assert client.get("/api/tasks").json()["tasks"][0]["is_done"] is False
|
||||
|
||||
|
||||
def test_task_crud(client):
|
||||
created = client.post("/api/tasks", json={"title": "Temporary", "priority": "p2"}).json()
|
||||
listing = client.get("/api/tasks").json()
|
||||
|
||||
Reference in new issue
Block a user