forked from Rockachopa/Timmy-time-dashboard
Adds tests/dashboard/test_daily_run.py with 51 test cases covering: - _load_config(): defaults, file loading, env var overrides, invalid JSON - _get_token(): from config dict, from file, missing file - GiteaClient: headers, api_url, is_available (true/false/cached), get_paginated - LayerMetrics: trend and trend_color properties (all directions) - DailyRunMetrics: sessions_trend and sessions_trend_color properties - _extract_layer(): label extraction from issue label lists - _load_cycle_data(): success counting, invalid JSON lines, missing timestamps - _fetch_layer_metrics(): counting logic, graceful degradation on errors - _get_metrics(): unavailable client, happy path, exception handling - Route handlers: /daily-run/metrics (JSON) and /daily-run/panel (HTML) All 51 tests pass. tox -e unit remains green (293 passing). Fixes #1186 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>