"""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. """ from __future__ import annotations import os import re import tempfile from pathlib import Path import pytest from jinja2 import Environment, FileSystemLoader from starlette.testclient import TestClient _TEMPLATES = Path(__file__).resolve().parents[1] / "app" / "web" / "templates" def _env(): return Environment(loader=FileSystemLoader(str(_TEMPLATES)), autoescape=True) # ============================================================ # US-002: Nomenclator ca tabel standard (grila Trimiteri) # ============================================================ def test_nomenclator_grila_standard_cu_randuri(): tmpl = _env().get_template("_nomenclator.html") html = tmpl.render(rows=[ {"cod_prestatie": "A012", "nume_prestatie": "Revizie tehnica", "updated_at": "2026-06-20"}, ]) assert "tablewrap" in html assert "