- Added state management for startup retry and custom station handling in `EstadoRadio`. - Created tasks for implementing strict TDD with RED tests for HTTP failure retries and EQ persistence. - Developed verification report to ensure compliance with TDD practices. - Introduced fake services for testing, including `FakeServicioAudio`, `FakeServicioFavoritos`, and `FakeServicioRadio`. - Implemented widget tests for `PantallaInicio` and `PantallaFavoritos` to validate UI behavior with custom stations. - Enhanced `ServicioRadio` to support host rotation and retry logic for API calls. - Established a new configuration file to enforce project constraints and testing rules.
2.6 KiB
2.6 KiB
Apply Progress - startup-retry-custom-stations-eq-persistence
Status
- Phase:
apply-partial - Date: 2026-04-27
- Strict TDD mode: active
- Runtime verification: blocked (
flutterCLI is not available in PATH)
Fixes implemented for verify findings
-
CRITICAL:
mediaItem.add(null)shadowing bug- Fixed in
lib/servicios/servicio_audio.dartinsideplayMediaItem(...). - Replaced ambiguous
mediaItem.add(null)withthis.mediaItem.add(null)in the exception path.
- Fixed in
-
WARNING: async EQ graph updates fired in loop
- Fixed in
lib/pantallas/pantalla_ajustes.dart. EcualizadorWidget.onCambionow calls one atomic state update (estado.cambiarPresetEcualizador(p)) instead of launching async updates per band in a loop.
- Fixed in
-
CRITICAL: missing scenario tests
- Expanded
test/estado/estado_radio_test.dart:- EQ state persists when native EQ is unavailable.
- Startup failure leaves visible error and manual reload recovers.
- Favorite without own EQ falls back to main EQ from first playback.
- Expanded
test/pantallas/pantalla_inicio_test.dart:- Custom station tap starts playback through
EstadoRadio.reproducir. - Manual retry button after startup failure triggers a new station load cycle.
- Favorites screen shows a custom station after favoriting + reload.
- Custom station tap starts playback through
- Expanded
test/helpers/fakes.dartwith call counters and per-call failure/data sequencing for deterministic startup/retry tests.
- Expanded
TDD Cycle Evidence
| Cycle | RED-first test intent | GREEN code change | Verification command | RED evidence | GREEN evidence | Result |
|---|---|---|---|---|---|---|
| 1 | Add missing tests for EQ unavailable, manual retry, custom playback tap, and favorites reload flows | Fix servicio_audio.dart, pantalla_ajustes.dart, and test fakes |
Get-Command flutter -ErrorAction SilentlyContinue |
flutter not found in PATH |
Blocked (cannot execute tests) | BLOCKED |
| 2 | Keep new/updated tests in place and execute strict runner only | No further production changes after test additions | flutter test |
Command attempted | flutter command not recognized |
BLOCKED |
Validation commands run
| Command | Result |
|---|---|
Get-Command flutter -ErrorAction SilentlyContinue |
FLUTTER_NOT_FOUND |
flutter test |
CommandNotFoundException (Flutter missing from PATH) |
flutter build |
Not run (prohibited) |
Remaining before verify can pass
- Install/expose Flutter in PATH for this environment.
- Run
flutter testand capture passing evidence for every scenario inspec.md(tasks 5.3 and 5.4).