fix: complete v1.2 account and profile P0 fixes

This commit is contained in:
2026-08-10 00:12:53 +08:00
parent 587962f9c9
commit 97ca20413e
14 changed files with 346 additions and 12 deletions
+21
View File
@@ -94,6 +94,27 @@ def test_latex_默认源码可渲染且_katex_静态资源完整():
assert (katex_root / "LICENSE.txt").is_file()
def test_latex_长公式不会挤走保存按钮():
styles = (STATIC_ROOT / "css" / "app.css").read_text(encoding="utf-8")
assert "grid-template-rows: auto minmax(0, 1fr) auto" in styles
assert "#latex-preview { align-self: center; width: 100%; min-width: 0" in styles
assert ".preview-pane button { align-self: end; justify-self: end" in styles
def test_rating_历史和登录后档案立即刷新():
template = (settings.BASE_DIR / "templates" / "index.html").read_text(encoding="utf-8")
app = (STATIC_ROOT / "js" / "app.js").read_text(encoding="utf-8")
realtime = (STATIC_ROOT / "js" / "realtime.js").read_text(encoding="utf-8")
assert 'id="home-match-history"' in template
assert "function renderMatchHistory(root, matches)" in app
assert "function loadHomeMatchHistory()" in app
assert '$("#view-profile").classList.contains("active") ? loadProfile() : null' in app
assert "state.user.rating = match.result.rating_after" in realtime
assert "updateUserUI();" in realtime
def test_production_manifest_可处理全部静态资源(tmp_path):
storage = "whitenoise.storage.CompressedManifestStaticFilesStorage"
with override_settings(