squid-main-space / tests /test_download_progress_v391.py
Zin299's picture
Deploy v4.6.20 agent reliability fixes
c175ac0
Raw
History Blame Contribute Delete
1.07 kB
import pathlib
ROOT=pathlib.Path(__file__).resolve().parents[1]
def test_version_391():
assert (ROOT/'VERSION').read_text(encoding='utf-8').strip()=='4.6.20'
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