feat(5.12): modal editare + cont obligatoriu la import; design.md + PRD 5.13 revizuit (/autoplan)
5.12 (livrat): editare in modal a randurilor de preview, cont obligatoriu inainte de import, formular editare extras (_form_editare, _editare_preview_modal), plus suita de teste aferenta (preview edit/compact, mapare op, form editare, signup, admin panel). Design + planificare: - docs/design.md: sistem de design (tokeni, breakpoints, scara control, componente, a11y). - docs/prd/prd-5.12-* si prd-5.13-* (5.13 cu raport /autoplan: CEO+Design+Eng, audit trail). Curatare: sterse PNG-urile de test/mockup temporare din radacina. Nota: implementarea CSS 5.13 (responsive compact + sistem butoane) NU e inca facuta — planul revizuit cere refactorul testelor fragile din test_web_responsive.py INAINTE de CSS. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,7 +24,7 @@ def _run(argv):
|
||||
|
||||
|
||||
def test_create_afiseaza_id(env, capsys):
|
||||
rc = _run(["create", "--name", "Service X"])
|
||||
rc = _run(["create", "--name", "Service X", "--cui", "RO001", "--email", "x@test.com"])
|
||||
out = capsys.readouterr().out
|
||||
assert rc == 0
|
||||
assert "id=2" in out
|
||||
@@ -32,14 +32,14 @@ def test_create_afiseaza_id(env, capsys):
|
||||
|
||||
|
||||
def test_create_inactive_in_asteptare(env, capsys):
|
||||
rc = _run(["create", "--name", "Service X", "--inactive"])
|
||||
rc = _run(["create", "--name", "Service X", "--cui", "RO002", "--email", "x2@test.com", "--inactive"])
|
||||
out = capsys.readouterr().out
|
||||
assert rc == 0
|
||||
assert "activ=nu" in out
|
||||
|
||||
|
||||
def test_create_with_key_emite_cheie(env, capsys):
|
||||
rc = _run(["create", "--name", "Service X", "--with-key"])
|
||||
rc = _run(["create", "--name", "Service X", "--cui", "RO003", "--email", "x3@test.com", "--with-key"])
|
||||
out = capsys.readouterr().out
|
||||
assert rc == 0
|
||||
assert "rfak_" in out
|
||||
@@ -57,8 +57,8 @@ def test_create_with_key_emite_cheie(env, capsys):
|
||||
|
||||
|
||||
def test_create_cui_duplicat_exit_2(env, capsys):
|
||||
assert _run(["create", "--name", "Service A", "--cui", "RO123"]) == 0
|
||||
rc = _run(["create", "--name", "Service B", "--cui", "RO123"])
|
||||
assert _run(["create", "--name", "Service A", "--cui", "RO123", "--email", "a@test.com"]) == 0
|
||||
rc = _run(["create", "--name", "Service B", "--cui", "RO123", "--email", "b@test.com"])
|
||||
err = capsys.readouterr().err
|
||||
assert rc == 2
|
||||
assert "RO123" in err
|
||||
@@ -66,10 +66,10 @@ def test_create_cui_duplicat_exit_2(env, capsys):
|
||||
|
||||
def test_with_key_atomic_pe_cui_duplicat(env, capsys):
|
||||
# cont initial care ocupa CUI
|
||||
assert _run(["create", "--name", "Service A", "--cui", "RO123"]) == 0
|
||||
assert _run(["create", "--name", "Service A", "--cui", "RO123", "--email", "a@test.com"]) == 0
|
||||
capsys.readouterr()
|
||||
# --with-key pe CUI duplicat: rollback -> niciun cont B, nicio cheie orfana
|
||||
rc = _run(["create", "--name", "Service B", "--cui", "RO123", "--with-key"])
|
||||
rc = _run(["create", "--name", "Service B", "--cui", "RO123", "--email", "b@test.com", "--with-key"])
|
||||
assert rc == 2
|
||||
from app.db import get_connection
|
||||
conn = get_connection()
|
||||
@@ -82,7 +82,7 @@ def test_with_key_atomic_pe_cui_duplicat(env, capsys):
|
||||
|
||||
|
||||
def test_activate_comuta_starea(env, capsys):
|
||||
_run(["create", "--name", "Service X", "--inactive"])
|
||||
_run(["create", "--name", "Service X", "--cui", "RO004", "--email", "x4@test.com", "--inactive"])
|
||||
capsys.readouterr()
|
||||
assert _run(["deactivate", "--account", "2"]) == 0
|
||||
assert _run(["activate", "--account", "2"]) == 0
|
||||
@@ -104,7 +104,7 @@ def test_activate_inexistent_exit_2(env, capsys):
|
||||
|
||||
|
||||
def test_list_afiseaza_activ(env, capsys):
|
||||
_run(["create", "--name", "Service X"])
|
||||
_run(["create", "--name", "Service X", "--cui", "RO005", "--email", "x5@test.com"])
|
||||
capsys.readouterr()
|
||||
rc = _run(["list"])
|
||||
out = capsys.readouterr().out
|
||||
@@ -114,8 +114,8 @@ def test_list_afiseaza_activ(env, capsys):
|
||||
|
||||
|
||||
def test_list_pending_filtreaza(env, capsys):
|
||||
_run(["create", "--name", "Activ SRL"])
|
||||
_run(["create", "--name", "Asteptare SRL", "--inactive"])
|
||||
_run(["create", "--name", "Activ SRL", "--cui", "RO006", "--email", "activ@test.com"])
|
||||
_run(["create", "--name", "Asteptare SRL", "--cui", "RO007", "--email", "ast@test.com", "--inactive"])
|
||||
capsys.readouterr()
|
||||
rc = _run(["list", "--pending"])
|
||||
out = capsys.readouterr().out
|
||||
|
||||
Reference in New Issue
Block a user