Spaces:
Sleeping
Sleeping
| import pytest | |
| from app.agents.d3 import templates # noqa: F401 (populate registry) | |
| from app.agents.d3.registry import TEMPLATES | |
| def test_template_uses_cream_navy_theme_and_viewbox(tid): | |
| t = TEMPLATES[tid] | |
| html = t.render(t.golden_sample) | |
| # old dark-theme colors must be fully gone | |
| assert "#0f0f0f" not in html, f"{tid}: stale dark background color #0f0f0f still present" | |
| assert "#e2e8f0" not in html, f"{tid}: stale light text color #e2e8f0 still present" | |
| # new cream background color must be present | |
| assert "#FAF7F2" in html, f"{tid}: new cream background color #FAF7F2 not found" | |
| # no more viewport-derived sizing | |
| assert "window.innerWidth" not in html, f"{tid}: window.innerWidth still referenced" | |
| assert "window.innerHeight" not in html, f"{tid}: window.innerHeight still referenced" | |
| # fit-to-container via viewBox must be present | |
| assert "viewBox" in html, f"{tid}: no viewBox attribute found" | |
| assert "preserveAspectRatio" in html, f"{tid}: no preserveAspectRatio attribute found" | |