from __future__ import annotations
import unittest
from pathlib import Path
PROJECT_ROOT = Path(__file__).resolve().parents[1]
STATIC_ROOT = PROJECT_ROOT / "arr_web" / "static"
class DailyVisualStaticContractTests(unittest.TestCase):
@classmethod
def setUpClass(cls) -> None:
cls.html = (STATIC_ROOT / "index.html").read_text(encoding="utf-8")
cls.styles = (STATIC_ROOT / "styles.css").read_text(encoding="utf-8")
def test_daily_workspace_uses_one_clear_history_title(self) -> None:
self.assertIn('ARR Report', self.html)
self.assertIn('
Daily Report
', self.html)
self.assertNotIn('Daily Report
', self.html)
self.assertNotIn('class="daily-section-heading"', self.html)
self.assertNotIn("THIS MONTH", self.html)
self.assertNotIn("日报处理记录", self.html)
self.assertIn("font-size: clamp(20px, 1.75vw, 24px)", self.styles)
def test_task_log_utility_is_visually_a_button(self) -> None:
self.assertIn('