Skip to content

test: Sprint test-2 — server logic + armo_base_panel anual#65

Merged
pablotis merged 1 commit intostagingfrom
chore/tests-sprint-2
May 7, 2026
Merged

test: Sprint test-2 — server logic + armo_base_panel anual#65
pablotis merged 1 commit intostagingfrom
chore/tests-sprint-2

Conversation

@pablotis
Copy link
Copy Markdown
Collaborator

@pablotis pablotis commented May 7, 2026

Summary

  • mod_calidad_panel_server (9 tests con testServer): switch trim/anual del dataset, filtrado por años + dúos, outputs KPI.
  • armo_base_panel(window="anual") (6 tests): parquet fixture + arrow::open_dataset (filter pushdown, drop de anio_0/trim_0, errores). Cubre el hotfix v0.7.3.

mod_analisis_*_server (cond_act / cat_ocup / formalidad) se difieren a Sprint test-3: requieren mockear ~6 globales por módulo y el ROI es bajo vs cubrirlo con shinytest2 E2E.

Suite local: 185 tests PASS (149 → 185).

Test plan

  • Suite local pasa (Rscript tests/testthat.R → 185 PASS).
  • CI (tests-unit.yml) verde con shiny + bslib ya en la lista de paquetes mínimos.
  • No hay regresiones en tests previos (149 + 36 nuevos).

🤖 Generated with Claude Code

Cobertura de la capa server-side:

- mod_calidad_panel_server (testServer): 9 tests para los reactives
  expuestos por el módulo. Switch del dataset según tipo_duo (trim ↔
  anual), filtrado por rango de años y dúos, outputs KPI calculando
  promedios sobre el filtro activo. Mock de globals (df_calidad_panel
  + df_calidad_panel_anual) y stub global de renderHighchart para no
  exigir el paquete en CI.

- armo_base_panel(window = "anual") (sin testServer): 6 tests con un
  parquet sintético en with_tempdir(). Verifica filter pushdown sobre
  (anio_0, trim_0), drop de esas cols del output, error informativo
  si no existe el parquet, validación de window inválido. Cubre el
  hotfix v0.7.3 (open_dataset vs read_parquet) sin tocar el archivo
  de producción.

mod_analisis_*_server diferidos a Sprint test-3 (E2E con shinytest2):
requieren mockear ~6 globals por módulo y el ROI es bajo vs probar
el flujo real desde browser.

Suite completa: 185 tests PASS · 0 fail.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@pablotis pablotis merged commit 7fcd3ee into staging May 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant