squid-main-space / tests /test_runtime_hotfix_v376.py
Zin299's picture
Deploy v4.3.0 persistent task center
e5e9d87
Raw
History Blame
714 Bytes
import pathlib
ROOT=pathlib.Path(__file__).resolve().parents[1]
def test_version_376():
assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.3.0"
def test_no_stray_async_before_sidebar_toggle():
js=(ROOT/"static"/"js"/"app.js").read_text(encoding="utf-8")
assert "async \nfunction bindSidebarToolsToggle" not in js
assert "async\nfunction bindSidebarToolsToggle" not in js
assert "function bindSidebarToolsToggle" in js
assert "async function boot()" in js
def test_auth_pending_has_escape_path():
js=(ROOT/"static"/"js"/"app.js").read_text(encoding="utf-8")
assert 'location.replace("/login")' in js
assert 'document.body.classList.remove("auth-pending")' in js