diet-guard/app/test
Krzysztof kuhy Rudnicki c935a202cc
Some checks are pending
pre-commit / pre-commit (push) Waiting to run
Tests / test (3.10) (push) Waiting to run
Tests / test (3.11) (push) Waiting to run
Tests / test (3.12) (push) Waiting to run
Make AppStatusColors lookup null-safe; fix tests that never had it
Theme.of(context).extension<AppStatusColors>()! crashed in any context
that doesn't build its theme from buildAppTheme() -- which is most widget
tests, since they wrap in a bare MaterialApp(home: ...) rather than the
real app theme. That crash was latent since AppStatusColors was
introduced but only became reachable once main.dart actually started
using buildAppTheme() (previous commit), which is when 27-47 tests
started failing.

Fixed at both call sites (slot_selector_row.dart, day_status_calendar.dart)
by falling back to AppStatusColors.dark instead of force-unwrapping --
production code should never trust every context to fully replicate the
real theme. Also fixed day_status_calendar_test.dart, which asserted
against stale hardcoded Colors.* values from before the theme rewrite;
it now wraps in the real buildAppTheme() and asserts against the actual
tokens, so the assertions mean something again.

Verified: flutter analyze clean, 436/436 tests pass (up from 389/47).
2026-07-22 16:52:13 +02:00
..
desktop app: add the desktop wrapper that serves the web build and fronts GitHub 2026-07-20 16:31:47 +02:00
models Add budget-adherence calendar, streaks, and freely-editable synced budget 2026-07-13 21:31:45 +02:00
screens app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
services app: test the IndexedDB stores instead of shipping them unverified 2026-07-20 16:56:15 +02:00
widgets Make AppStatusColors lookup null-safe; fix tests that never had it 2026-07-22 16:52:13 +02:00
fake_notifications.dart Add OAuth device flow, background notifications, and fix AGP9 release crash (Milestones 3–4) 2026-06-25 17:29:23 +02:00
fake_secure_storage.dart Add Flutter half of cross-device sync (Milestone 3) 2026-06-22 22:42:27 +02:00
widget_test.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00