From dc9911739d480af800e54714cdc2bae44f1f47f7 Mon Sep 17 00:00:00 2001 From: nesquena-hermes Date: Sun, 20 Sep 2026 12:55:11 +0000 Subject: [PATCH] test(goal): assert /goal membership, not the exact passthrough list literal #6962 adds 'stop' to the busy-command passthrough list in messages.js so a busy /stop cancels immediately. test_frontend_has_goal_slash_command_and_status_event_handler asserted the exact list literal, so it failed on a change that does not affect /goal. Assert that 'goal' is a member of the list instead. Verified the assertion still fails when 'goal' is actually removed from the list. --- tests/test_goal_command_webui.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/test_goal_command_webui.py b/tests/test_goal_command_webui.py index 2fd7800c..651d15f9 100644 --- a/tests/test_goal_command_webui.py +++ b/tests/test_goal_command_webui.py @@ -671,7 +671,14 @@ def test_frontend_has_goal_slash_command_and_status_event_handler(): assert "goal'" in MESSAGES_JS assert "source.addEventListener('goal'" in MESSAGES_JS assert "source.addEventListener('goal_continue'" in MESSAGES_JS - assert "['steer','interrupt','queue','terminal','goal','yolo'].includes(_pc.name)" in MESSAGES_JS + # #6962 added 'stop' to this busy-command passthrough list so a busy /stop + # cancels immediately. Assert /goal's membership rather than the exact list + # literal, so adding another passthrough command does not fail this test. + _passthrough = re.search( + r"if\(_pc&&\[([^\]]*)\]\.includes\(_pc\.name\)\)", MESSAGES_JS + ) + assert _passthrough, "busy-command passthrough list not found in messages.js" + assert "'goal'" in _passthrough.group(1) assert "queueSessionMessage" in MESSAGES_JS