File size: 1,067 Bytes
30dfd74 e5e9d87 30dfd74 f9dcec9 30dfd74 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
import pathlib
ROOT=pathlib.Path(__file__).resolve().parents[1]
def test_version_391():
assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.3.0"
def test_p1_label_removed():
js=(ROOT/"static"/"js"/"app.js").read_text(encoding="utf-8")
assert "统一智能查询 · P1" not in js
assert "统一智能查询" in js
def test_download_progress_manager_present():
js=(ROOT/"static"/"js"/"app.js").read_text(encoding="utf-8")
assert "function downloadWithProgress" in js
assert "/api/download/jobs" in js
assert "seconds_since_activity" in js or "秒无新字节" in js
assert "active_download_job" in js
def test_project_package_uses_progress_manager():
js=(ROOT/"static"/"js"/"project-package.js").read_text(encoding="utf-8")
assert 'downloadWithProgress(r.download_url,"project_data_package.zip"' in js
def test_progress_css_present():
css=(ROOT/"static"/"css"/"app.css").read_text(encoding="utf-8")
assert ".download-progress-overlay" in css
assert ".download-progress-bar.indeterminate" in css
|