from pathlib import Path ROOT = Path(__file__).resolve().parents[1] def read(path: str) -> str: return (ROOT / path).read_text(encoding="utf-8") def test_customer_mismatch_warning_disabled_by_default(): config = read("app/config.py") assert "clientflow_customer_mismatch_warning_enabled: bool = False" in config assert "legitimate contacts use abbreviated names" in config def test_opportunity_detail_switches_to_single_column_earlier(): styles = read("app/admin_ui/styles.py") assert "@media (max-width: 1400px)" in styles assert ".detail-grid" in styles assert "grid-template-columns: 1fr !important" in styles def test_v462_notes_exist(): notes = read("docs/CLIENTFLOW_V462_DISABLE_CUSTOMER_MISMATCH_WARNING.md") assert "CLIENTFLOW_CUSTOMER_MISMATCH_WARNING_ENABLED=false" in notes assert "Riotec elec" in notes assert "Bruno Oliveira" in notes