refactor: comentarii strict functionale, fara referinte PRD/stories
Curatare globala a comentariilor si docstring-urilor (app, tools, teste, scripturi): eliminate referintele la PRD-uri, US-xxx, task-uri istorice si review-uri; pastrata doar informatia functionala, formulata scurt. Regula adaugata in CLAUDE.md (sectiunea Stil). Fara modificari de cod sau comportament. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
"""Teste US-013 (PRD 5.10): Tema de culori ROMFAST (accent azur) + tipografie IBM Plex.
|
||||
|
||||
TDD: testele se scriu INAINTE de implementare (RED), dupa implementare trec (GREEN).
|
||||
"""Teste tema de culori ROMFAST (accent azur) + tipografie.
|
||||
|
||||
Testeaza:
|
||||
- test_paleta_accent_azur_definita: accentul azur ROMFAST definit corect in :root si [data-theme="light"]
|
||||
- test_font_ibm_plex_aplicat: IBM Plex Sans + Mono declarate in font-family si @font-face
|
||||
- test_paleta_accent_azur_definita: accentul azur definit corect in :root si [data-theme="light"]
|
||||
- test_font_system_stack_aplicat: stiva de fonturi sistem aplicata (fara IBM Plex)
|
||||
- test_contrast_aa_pe_text_principal: contrast text principal >= 4.5:1 in dark si light
|
||||
"""
|
||||
|
||||
@@ -91,7 +89,7 @@ def test_paleta_accent_azur_definita(client):
|
||||
assert resp.status_code == 200
|
||||
style = _get_style_block(resp.text)
|
||||
|
||||
# Paleta dark (:root)
|
||||
# Paleta dark (implicita, :root)
|
||||
dark_vars = {
|
||||
"--accent": "#2E74D6",
|
||||
"--bg": "#0f1218",
|
||||
@@ -140,12 +138,12 @@ def test_paleta_accent_azur_definita(client):
|
||||
# ── test_font_system_stack_aplicat ───────────────────────────────────────────
|
||||
|
||||
def test_font_system_stack_aplicat(client):
|
||||
"""US-001 (PRD 5.16): IBM Plex eliminat; body foloseste stiva de fonturi sistem.
|
||||
"""Body foloseste stiva de fonturi sistem, fara IBM Plex.
|
||||
|
||||
Verifica:
|
||||
- body font-family foloseste var(--font-ui) (CSS custom property)
|
||||
- --font-ui este definit in :root si contine un system font stack (system-ui / -apple-system)
|
||||
- ZERO @font-face cu 'IBM Plex' in <style> (IBM Plex eliminat complet)
|
||||
- ZERO @font-face cu 'IBM Plex' in <style>
|
||||
- ZERO referinte catre /static/fonts/ in HTML (nu se mai servesc fisiere woff2)
|
||||
"""
|
||||
resp = client.get("/login")
|
||||
@@ -176,18 +174,17 @@ def test_font_system_stack_aplicat(client):
|
||||
f"Valoare gasita: {font_ui_m.group(1).strip()}"
|
||||
)
|
||||
|
||||
# 3. ZERO @font-face cu IBM Plex (eliminat in US-001)
|
||||
# 3. ZERO @font-face cu IBM Plex
|
||||
font_face_blocks = re.findall(r"@font-face\s*\{([^}]+)\}", style, re.DOTALL)
|
||||
ibm_face = [b for b in font_face_blocks if "IBM Plex" in b or "ibm-plex" in b.lower()]
|
||||
assert not ibm_face, (
|
||||
f"@font-face cu IBM Plex trebuia eliminat (US-001 PRD 5.16). "
|
||||
f"Blocat gasit: {ibm_face}"
|
||||
f"@font-face cu IBM Plex trebuia eliminat. Bloc gasit: {ibm_face}"
|
||||
)
|
||||
|
||||
# 4. ZERO referinte /static/fonts/ in HTML randat (nu mai servim woff2)
|
||||
html = resp.text
|
||||
assert "/static/fonts/" not in html, (
|
||||
"Referinte catre /static/fonts/ gasite in HTML — trebuie eliminate (US-001 PRD 5.16)."
|
||||
"Referinte catre /static/fonts/ gasite in HTML — trebuie eliminate."
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user