"""Teste uniformizare UI: Acasa fara sectiunea Ajutor, Nomenclator ca grila standard, macro autosend_toggle neutralizat. """ 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) # ============================================================ # 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 "