From 4b7ee13cf5553eb5f82780913a887ac7e8a9566c Mon Sep 17 00:00:00 2001 From: zhangshy <994452054@qq.com> Date: Mon, 14 Sep 2026 10:56:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E5=8F=B0=E5=87=BD=E6=95=B0=E7=BC=BA=E5=B0=91?= =?UTF-8?q?=E9=97=AD=E5=90=88=E5=A4=A7=E6=8B=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../portal/employee-console/workspace/workspace.js | 2 ++ tests/unit/api/test_portal_frontend.py | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/app/static/portal/employee-console/workspace/workspace.js b/app/static/portal/employee-console/workspace/workspace.js index 178a503..9bf8440 100644 --- a/app/static/portal/employee-console/workspace/workspace.js +++ b/app/static/portal/employee-console/workspace/workspace.js @@ -537,6 +537,8 @@ if (requireAdmin()) { apiClient.reportError(error); status.textContent = error.message || '提交失败'; } finally { submit.disabled = false; } + } + async function loadDriftReviews() { renderLoading(targets.drift, 3); try { diff --git a/tests/unit/api/test_portal_frontend.py b/tests/unit/api/test_portal_frontend.py index 1f68411..b80bb8c 100644 --- a/tests/unit/api/test_portal_frontend.py +++ b/tests/unit/api/test_portal_frontend.py @@ -321,6 +321,17 @@ def test_admin_workspace_is_not_an_identity_placeholder() -> None: assert label in html +def test_admin_workspace_rule_submit_closes_before_next_function() -> None: + source = ( + PORTAL / "employee-console" / "workspace" / "workspace.js" + ).read_text(encoding="utf-8") + assert ( + " } finally { submit.disabled = false; }\n" + " }\n\n" + " async function loadDriftReviews() {" + ) in source + + def test_frontend_has_no_remote_scripts_or_token_local_storage() -> None: sources = "\n".join( path.read_text(encoding="utf-8")