feat: expand toolbox and add math games
CI / test (pull_request) Canceled after 13s

This commit is contained in:
2026-08-09 01:52:35 +08:00
parent b99a22fc06
commit 6cd155ef05
7 changed files with 1216 additions and 35 deletions
+21
View File
@@ -34,3 +34,24 @@ def test_admin_css_深色系统下仍保持完整浅色主题():
assert "background-color: #ffffff !important" in source
assert ".theme-toggle" in source
assert "display: none" in source
def test_toolbox_and_games_资源入口与移动端触控样式存在():
template = (settings.BASE_DIR / "templates" / "index.html").read_text(encoding="utf-8")
toolbox = (STATIC_ROOT / "js" / "toolbox.js").read_text(encoding="utf-8")
games = (STATIC_ROOT / "js" / "games.js").read_text(encoding="utf-8")
styles = (STATIC_ROOT / "css" / "app.css").read_text(encoding="utf-8")
assert "js/toolbox.js" in template
assert "js/games.js" in template
assert 'id="whiteboard-canvas"' in template
assert 'id="geometry-canvas"' in template
assert 'id="math-game-list"' in template
assert "window.HuluToolbox" in toolbox
assert "pointerdown" in toolbox
assert "window.HuluGames" in games
assert "sudoku-board" in games
assert "touch-action: none" in styles
assert ".calculator-controls [hidden]" in styles
assert ".sudoku-board" in styles
assert "@media (max-width: 700px)" in styles