18 lines
487 B
Python
18 lines
487 B
Python
from pathlib import Path
|
|
import unittest
|
|
|
|
|
|
CALCULATOR_HTML = Path(__file__).parents[1] / "web" / "calculator.html"
|
|
|
|
|
|
class CalculatorWebTests(unittest.TestCase):
|
|
def test_coaching_today_button_uses_the_shared_today_handler(self):
|
|
html = CALCULATOR_HTML.read_text(encoding="utf-8")
|
|
|
|
self.assertIn('id="todayBtn" class="today-btn quick-btn"', html)
|
|
self.assertIn("document.querySelectorAll('.today-btn')", html)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|