| 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 | |