screen-locker/stronglift_replacement/workout_app/test
Krzysztof kuhy Rudnicki 0921146044 Tests can no longer write the live desktop Firebase credential
`flutter test` runs on a Linux host, so credentialStore()'s Platform.isLinux
branch wrote $HOME/.config/screen_locker/firebase_auth.json -- the refresh
token the screen-locker daemon signs in with. firebase_backend_google_test's
"stores the account under the email Firebase reports" case overwrote it with
the fixture token 'refresh' on every local run; the daemon only survived by
self-healing from a cached token.

Dart:
- lib/services/desktop_config_dir.dart: one resolver, desktopConfigRoot(),
  for every desktop path (the credential file's read/write/delete and the
  ~/.config/crdt-sync account read). @visibleForTesting override; under
  FLUTTER_TEST it throws StateError if the root is, or is inside, the real
  $HOME/.config -- so a test that bypasses the override fails loudly instead
  of writing. HOME unset now yields null instead of a cwd-relative .config.
- The crdt-sync read resolves the root outside its catch-all, so the guard
  cannot be swallowed as "not connected".
- test/flutter_test_config.dart gives every test its own temp config root.
- The Google sign-in test now asserts the token landed in that temp root.
- path_provider is unbound under flutter test (MissingPluginException), so
  the getApplicationSupportDirectory callers cannot reach live dirs.

Python (tests only): isolate_sync_token now patches every import-time
binding of SYNC_TOKEN_FILE (_constants, _manual_push, _sync_status were
missed), and test_home_isolation scans all runtime modules for any Path
still bound inside the real ~/.config/screen_locker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KFwA9nymhUdTrVF65kigTV
2026-09-27 08:35:18 +02:00
..
models workout_app: run the break countdown in a foreground service with notifications 2026-09-13 20:28:36 +02:00
sandbox SandboxLog.flush(): the logcat test awaits the write instead of guessing a turn 2026-09-20 22:04:15 +02:00
screens Workout screen never moves when a rest starts; a sandbox flavor to prove it on the phone 2026-09-20 18:55:08 +02:00
services Tests can no longer write the live desktop Firebase credential 2026-09-27 08:35:18 +02:00
ui workout_app: warm-tint the unified-design-system palette 2026-07-22 21:08:45 +02:00
widgets Workout screen never moves when a rest starts; a sandbox flavor to prove it on the phone 2026-09-20 18:55:08 +02:00
fake_audio_platform.dart workout_app: run the break countdown in a foreground service with notifications 2026-09-13 20:28:36 +02:00
fake_break_service.dart workout_app: run the break countdown in a foreground service with notifications 2026-09-13 20:28:36 +02:00
fake_path_provider.dart workout_app: run the break countdown in a foreground service with notifications 2026-09-13 20:28:36 +02:00
fake_secure_storage.dart Add phone-workout GitHub sync via shared crdt_sync (Workstream C) 2026-07-11 00:06:59 +02:00
firebase_backend_google_test.dart Tests can no longer write the live desktop Firebase credential 2026-09-27 08:35:18 +02:00
flutter_test_config.dart Tests can no longer write the live desktop Firebase credential 2026-09-27 08:35:18 +02:00
google_platform_test.dart workout_app: add Google sign-in support for the Firebase sync account 2026-08-14 10:56:16 +02:00
google_platform_web_test.dart workout_app: add Google sign-in support for the Firebase sync account 2026-08-14 10:56:16 +02:00
google_sign_in_backend_test.dart workout_app: add Google sign-in support for the Firebase sync account 2026-08-14 10:56:16 +02:00
main_lifecycle_test.dart Cover the lock-mode flag, and mark the one branch Linux cannot reach 2026-08-22 13:06:49 +02:00
widget_test.dart Workout screen never moves when a rest starts; a sandbox flavor to prove it on the phone 2026-09-20 18:55:08 +02:00