feat(5.10): UX trimiteri (pill filtre, paginare, editare) + Mapari in meniu + branding ROMFAST
14 stories TDD prin echipa de workeri (lead orchestreaza, 3 teammates pe valuri cu fisiere disjuncte; routes.py + base.html serializate ca fisiere fierbinti). - US-001 fix filtrare data (_iso_date_prefix pe garda+comparatie, prinde timestamp cu ora) - US-002/007 operatie service distincta in payload_view + afisare in detaliu - US-003 pill-uri categorii (button/aria-pressed; needs_mapping --warn, needs_data/error --err); fara lista ID-uri/dropdown - US-004 paginare numerotata 25/pag (total ramificat SQL-COUNT vs fetch-all+slice, clamp page, poll pastreaza pagina) - US-005 VIN block-level sub nr - US-006/006b editare cod RAR + validare nomenclator + recalcul idempotency (needs_data/needs_mapping via /corecteaza, error via /repune) - US-008 card eroare 3-niveluri doar pe read-only + rezumat top-of-form - US-009 Mapari in meniu hamburger; scoatere tab-bar + role=tablist orfan - US-010/011 pagina Mapari consolidata + butoane icon SVG + dirty-state (fara kebab/emoji) - US-012/012b header centrat + logo ROMFAST (/static/romfast_logo.png) in header - US-013 paleta azur ROMFAST (#2E74D6/#1F66C9) + IBM Plex Sans/Mono self-host (woff2 reale) - US-014 selector tema ciclic Light/Dark/Petrol/Auto + anti-FOUC pe 4 stari Backend trimitere (worker/masina stari/idempotenta/mapping) + schema NEATINSE (UI/UX pur + 1 fix de filtrare). VERIFY context curat PASS; /code-review high: 1 finding material reparat (US-006b). Regresie 896 passed, 1 skipped, 0 failed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -137,24 +137,23 @@ def test_status_blocate_defalcare(client):
|
||||
assert resp.status_code == 200
|
||||
|
||||
html = resp.text
|
||||
# Trebuie sa arate titlul grupului de blocate
|
||||
assert "Necesita atentia ta" in html, (
|
||||
f"Fragmentul nu contine 'Necesita atentia ta'. HTML: {html[:800]}"
|
||||
# US-003 (PRD 5.10): Blocatele apar ca pill-uri (nu ca lista cu ID-uri)
|
||||
assert "Necesita atentie" in html, (
|
||||
f"Fragmentul nu contine sectiunea 'Necesita atentie'. HTML: {html[:800]}"
|
||||
)
|
||||
# Trebuie sa arate etichetele umane pe motiv (din STARI_SUBMISSION in labels.py)
|
||||
assert "Lipseste codul prestatiei" in html, (
|
||||
"Fragmentul nu arata eticheta pentru needs_mapping"
|
||||
# Pill-urile au etichetele scurte per categorie (nu etichetele lungi din eticheta_stare)
|
||||
assert "Lipsa cod" in html, (
|
||||
"Fragmentul nu arata pill-ul pentru needs_mapping"
|
||||
)
|
||||
assert "Date incomplete" in html, (
|
||||
"Fragmentul nu arata eticheta pentru needs_data"
|
||||
"Fragmentul nu arata pill-ul pentru needs_data"
|
||||
)
|
||||
assert "Eroare la trimitere" in html, (
|
||||
"Fragmentul nu arata eticheta pentru error"
|
||||
assert "Eroare" in html, (
|
||||
"Fragmentul nu arata pill-ul pentru error"
|
||||
)
|
||||
# Trebuie sa arate numere concrete (2 needs_mapping, 1 needs_data, 1 error)
|
||||
# Verificam ca exista cel putin un numar > 0 langa fiecare eticheta
|
||||
# (nu strict format, ci prezenta datelor)
|
||||
assert "2" in html or "1" in html, "Fragmentul nu arata numarul de submissions blocate"
|
||||
# Pill-urile arata numarul total per categorie (2 needs_mapping, 1 needs_data, 1 error)
|
||||
assert "2" in html, "Pill-ul needs_mapping trebuie sa arate numarul 2"
|
||||
assert "<button" in html, "Pill-urile trebuie sa fie elemente <button>"
|
||||
|
||||
|
||||
# ============================================================
|
||||
@@ -208,26 +207,33 @@ def _insert_submission_vehicul(status, account_id, vin, nr):
|
||||
|
||||
|
||||
def test_categorie_blocata_linkeaza_la_trimiteri_filtrate(client):
|
||||
"""US-003 (PRD 5.10): pill-ul error are hx-get cu ?status=error.
|
||||
Deep-link-ul tab=acasa&status=error a fost eliminat (pill inlocuieste link-ul vechi)."""
|
||||
acct_id, _ = _create_account_user("link@test.com", "parolasecreta10")
|
||||
_login(client, "link@test.com", "parolasecreta10")
|
||||
_insert_submission("error", acct_id)
|
||||
|
||||
html = client.get("/_fragments/status").text
|
||||
# Link HTMX catre lista filtrata pe error + deep-link server-side
|
||||
# Pill-ul are hx-get cu status=error (filtrare directa submissions)
|
||||
assert "/_fragments/submissions?status=error" in html
|
||||
assert "tab=acasa&status=error" in html
|
||||
# Deep-link-ul tab=acasa&status=error nu mai exista — pill-uri inlocuiesc link-urile
|
||||
assert "tab=acasa&status=error" not in html
|
||||
|
||||
|
||||
def test_status_arata_identificator_rand_blocat(client):
|
||||
def test_status_nu_arata_identificator_rand_blocat(client):
|
||||
"""US-003 (PRD 5.10): VIN/nr inmatriculare nu mai apar in bara de status.
|
||||
Lista de ID-uri a fost inlocuita cu pill-uri cu numar total (fara PII nominal)."""
|
||||
acct_id, _ = _create_account_user("ident@test.com", "parolasecreta10")
|
||||
_login(client, "ident@test.com", "parolasecreta10")
|
||||
_insert_submission_vehicul("error", acct_id, "WVWZZZ1KZAW000123", "B123ABC")
|
||||
|
||||
html = client.get("/_fragments/status").text
|
||||
# VIN partial (ultimele 4) + nr inmatriculare + #id
|
||||
assert "0123" in html, "lipseste VIN partial"
|
||||
assert "B123ABC" in html, "lipseste nr inmatriculare"
|
||||
# Bara de status arata pill cu count, nu lista cu VIN/nr per rand
|
||||
assert "B123ABC" not in html, "Nr inmatriculare nu trebuie sa mai apara in bara de status"
|
||||
assert "WVWZZZ1KZAW000123" not in html, "VIN integral nu trebuie expus"
|
||||
assert "0123" not in html, "VIN partial nu trebuie sa mai apara in bara de status"
|
||||
# Pill-ul cu count 1 apare in locul listei
|
||||
assert "status=error" in html, "Pill error trebuie sa aiba hx-get cu status=error"
|
||||
|
||||
|
||||
def test_scoped_pe_cont(client):
|
||||
|
||||
Reference in New Issue
Block a user