feat(ux): import compact + preview format Trimiteri + navigatie + scoatere auto_send (5.11)

8 stories TDD (echipa Sonnet, lead orchestreaza). US-001 scoate hold-ul auto_send din mapare
(has_no_auto_send->False, simbol pastrat; cod rezolvat->queued). US-002 scoate bifa auto_send
din UI. US-003 preview pas 3 in format .tabel-trimiteri (STARI_PREVIEW + nota_umana_preview,
fara repr Python; view-model prez). US-004 filtre layout/stil ca referinta + buton Custom.
US-005 navigatie Trimiteri/Mapari sub contoare pe toate paginile. US-006 import <details> nativ
colapsabil. US-007 post-commit reveal (OOB _coada/_status + HX-Trigger). US-008 auto-refresh
dupa actiuni (nudge eliminat).

VERIFY context curat PASS (8/8). /code-review high: 3 buguri reparate (tab nav la self-refresh,
pill Custom valori stale, nota_umana_preview precedenta needs_mapping). 934 passed, 1 skipped.
Backend trimitere + schema NEATINSE.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude Agent
2026-06-26 15:16:28 +00:00
parent 412102b9b1
commit 283299ff20
34 changed files with 3079 additions and 389 deletions

View File

@@ -1,6 +1,5 @@
"""Teste PRD 5.5 — uniformizare UI: US-001 (Acasa fara Ajutor), US-002 (Nomenclator grila
standard), US-003 (macro autosend compact). Stories de template/macro -> render direct Jinja
pentru US-002/003; US-001 prin TestClient pe fragmentul Acasa.
standard), US-003 (macro autosend) — actualizat dupa PRD 5.11 US-002 (macro neutralizat).
"""
from __future__ import annotations
@@ -53,32 +52,26 @@ def _render_macro(form_id="map-1", checked=True):
def test_autosend_pastreaza_name_si_prezenta():
"""Invariant backend: checkbox name=auto_send value=true (semantica de prezenta)."""
"""US-002 (PRD 5.11): macro autosend_toggle neutralizat — output gol, fara checkbox."""
html = _render_macro(checked=True)
assert 'type="checkbox"' in html
assert 'name="auto_send"' in html
assert 'value="true"' in html
assert 'form="map-1"' in html
assert "checked" in html
assert 'name="auto_send"' not in html, "US-002: checkbox auto_send scos din macro"
assert html.strip() == "", f"macro neutralizat trebuie sa intoarca string gol, got: {html!r}"
def test_autosend_nebifat_fara_checked():
"""US-002: macro neutralizat intoarce gol indiferent de checked."""
html = _render_macro(checked=False)
assert 'name="auto_send"' in html
assert "checked" not in html
assert 'name="auto_send"' not in html
assert html.strip() == ""
def test_autosend_compact_fara_proza_inline():
"""Proza explicativa de pe randuri (3.6) eliminata din CONTINUTUL vizibil — traieste in
panoul Ajutor (US-005). Tooltip-ul scurt (atribut title=) e acceptat, deci il scoatem
inainte de verificare."""
"""US-002: macro neutralizat nu contine nicio proza inline."""
html = _render_macro()
vizibil = re.sub(r'title="[^"]*"', "", html) # scoate atributul title (tooltip)
assert "La fisierele viitoare" not in vizibil
assert "Tine pentru verificare" not in vizibil
assert "nimic nu pleaca la RAR" not in vizibil
# ambele etichete de stare vizibile, compact
assert "Auto" in html and "Manual" in html
assert "La fisierele viitoare" not in html
assert "Tine pentru verificare" not in html
assert "nimic nu pleaca la RAR" not in html
assert html.strip() == ""
# ============================================================
@@ -155,16 +148,16 @@ def test_mapari_ajutor_disclosure_si_fara_proza_inline(client):
html = resp.text
# US-010: sectiunea de ajutor (<details class="ajutor-mapari">) eliminata
assert "ajutor-mapari" not in html
# antet de coloana compact
assert ">In coada<" in html
# US-002: coloana In coada scoasa din tabel
assert "In coada" not in html, "US-002: coloana 'In coada' scoasa din tabelul Mapari"
# proza inline veche eliminata de pe sectiuni
assert "sugestia fuzzy e preselectata) si salveaza" not in html
assert "Maparile operatie -> cod RAR retinute pentru contul tau" not in html
def test_mapari_comutator_compact_in_tabel(client):
"""US-002: tabul Mapari nu mai contine checkbox auto_send."""
acct = _login(client)
_seed_needs_mapping(acct)
html = client.get("/_fragments/mapari").text
assert 'name="auto_send"' in html
assert "Manual" in html and "Auto" in html
assert 'name="auto_send"' not in html, "US-002: checkbox auto_send scos din UI"