test(sidebar): relax menu delete hook assertion

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Frank SongandPaperclip committed 2026-06-30 11:31:41 +08:00
1 parent bb6487a70a
commit 670105b121
1 file changed
+2 -1
+2 -1
View File
@@ -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"
)