From 670105b121a9052bf0d7cd65d7a9a52069bb9fde Mon Sep 17 00:00:00 2001 From: Frank Song Date: Tue, 30 Jun 2026 11:31:41 +0800 Subject: [PATCH] test(sidebar): relax menu delete hook assertion Co-Authored-By: Paperclip --- tests/test_1466_sidebar_cancel_clarify.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_1466_sidebar_cancel_clarify.py b/tests/test_1466_sidebar_cancel_clarify.py index d48cc302..0dc7c291 100644 --- a/tests/test_1466_sidebar_cancel_clarify.py +++ b/tests/test_1466_sidebar_cancel_clarify.py @@ -95,7 +95,8 @@ class TestSidebarCancelAction: def test_menu_delete_optimistically_removes_sidebar_row_before_backend_cleanup(self): """Context-menu Delete should not keep the row visible while slow DELETE cleanup runs.""" body = _function_body(SESSIONS_JS, "_openSessionActionMenu", 8400) - assert "await deleteSession(session.session_id,()=>Promise.resolve());" in body, ( + compact_body = "".join(body.split()) + assert "awaitdeleteSession(session.session_id,()=>Promise.resolve())" in compact_body, ( "menu Delete must pass an immediate beforeDelete hook so deleteSession() " "optimistically removes the sidebar row before awaiting /api/session/delete" )