feat(web): dashboard compact — import pe Acasa, status cu bife, Trimiteri lizibile, Mapari complete (3.5)
Acasa = ecran de import (tab Import scos, ?tab=import->Acasa). Bara status compacta pe 2 randuri cu bife accesibile (glife + text) + data formatata. 'Coada'->'Trimiteri': coloane RO, stare umana, detaliu la click in panou dedicat. Mapari pe 3 sectiuni (de rezolvat / op salvate / formate coloane), Cont doar cheie+creds. Filtrare Trimiteri, corectie inline needs_data cu re-enqueue + detectie coliziune idempotency, badge contoare pe tab-uri. Helper pur partajat payload_view.py (web + GET /v1/prezentari). Backend trimitere (worker/idempotenta/mapping/schema) neatins. 483 teste. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -46,7 +46,12 @@ def _starile_din_schema() -> list[str]:
|
||||
# Import modulul de etichete (va esua la RED, inainte de implementare)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
from app.web.labels import eticheta_stare, eticheta_worker, eticheta_rar # noqa: E402
|
||||
from app.web.labels import ( # noqa: E402
|
||||
eticheta_stare,
|
||||
eticheta_worker,
|
||||
eticheta_rar,
|
||||
format_data_rar,
|
||||
)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -128,6 +133,35 @@ def test_eticheta_stare_submission():
|
||||
_STARI_SCHEMA = _starile_din_schema()
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Test format_data_rar (US-001, PRD 3.5)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
def test_format_data_rar():
|
||||
"""`2026-06-18T14:30:22` -> `18.06.2026 14:30:22`."""
|
||||
assert format_data_rar("2026-06-18T14:30:22") == "18.06.2026 14:30:22"
|
||||
|
||||
|
||||
def test_format_data_rar_cu_timezone():
|
||||
"""Timezone si microsecunde nu strica formatarea; fractiunile cad."""
|
||||
assert format_data_rar("2026-06-18T14:30:22.123456+00:00") == "18.06.2026 14:30:22"
|
||||
assert format_data_rar("2026-06-18T14:30:22Z") == "18.06.2026 14:30:22"
|
||||
|
||||
|
||||
def test_format_data_rar_lipsa():
|
||||
"""Valoare lipsa -> em-dash, nu exceptie."""
|
||||
assert format_data_rar(None) == "—"
|
||||
assert format_data_rar("") == "—"
|
||||
assert format_data_rar(" ") == "—"
|
||||
|
||||
|
||||
def test_format_data_rar_invalid():
|
||||
"""Format invalid -> fallback grijuliu (intoarce brutul, nu arunca)."""
|
||||
# Nu trebuie sa arunce
|
||||
assert format_data_rar("nu-e-data") == "nu-e-data"
|
||||
assert format_data_rar(12345) == "12345"
|
||||
|
||||
|
||||
@pytest.mark.parametrize("status", _STARI_SCHEMA)
|
||||
def test_toate_starile_au_eticheta(status: str):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user