test(viz): test_agent_runs_timeline — 17 cases / 53 assertions

Issue 0118. Catch2 coverage de los helpers puros:

- passes_filter: filtro vacio, filter por app, app+status combinado, since_ts
- filter_and_sort: orden started_at DESC, combina filtro + sort
- format_duration: running, segundos, minutos, horas, timestamps invertidos
- status_color_token: mapping conocido + fallback neutral
- status_icon_id: no-empty + distinto entre statuses
- app_chip_hex: apps conocidas + fallback gris

Mock fixture de 5 AgentRun mixtos en make_mock().

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-18 18:31:37 +02:00
parent a91ef5aace
commit ecd864f2d3
2 changed files with 187 additions and 0 deletions
+4
View File
@@ -297,3 +297,7 @@ target_compile_definitions(test_visual PRIVATE
"FN_TEST_REPO_ROOT=\"${CMAKE_SOURCE_DIR}/..\"")
# Asegura que primitives_gallery existe antes de correr el test.
add_dependencies(test_visual primitives_gallery)
# --- Issue 0118 — agent_runs_timeline: helpers puros ----------
add_fn_test(test_agent_runs_timeline test_agent_runs_timeline.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/agent_runs_timeline_helpers.cpp)