|
|
@@ -1428,6 +1428,19 @@ class TestInteractiveReactionRouting:
|
|
|
|
|
|
assert "prompt-1" in adapter._clarify_prompts
|
|
|
|
|
|
+ async def test_invalid_clarify_feedback_names_the_options(self, adapter):
|
|
|
+ """The rejection must teach the valid reactions — a ✅ on a clarify
|
|
|
+ card is not an option by design, and the answer has to say which are."""
|
|
|
+ self._clarify(adapter)
|
|
|
+ adapter._chatto_client.post_message = AsyncMock(
|
|
|
+ return_value=_make_message(body="ack", message_id="ack-1")
|
|
|
+ )
|
|
|
+ await adapter._handle_realtime_event(self._event("✅"))
|
|
|
+
|
|
|
+ body = adapter._chatto_client.post_message.await_args.kwargs["body"]
|
|
|
+ assert "React with 1️⃣, 2️⃣, ✏️" in body
|
|
|
+ assert "🚀" not in body
|
|
|
+
|
|
|
async def test_the_other_emoji_reaction_is_recognized(self, adapter):
|
|
|
"""✏️ routes to the awaiting-text path — the keycap-style normalization
|
|
|
must not have lost the Other button."""
|
|
|
@@ -1471,6 +1484,18 @@ class TestInteractiveReactionRouting:
|
|
|
resolve.assert_not_called()
|
|
|
assert "prompt-1" in adapter._approval_prompts
|
|
|
|
|
|
+ async def test_invalid_approval_feedback_repeats_the_legend(self, adapter):
|
|
|
+ """The card's legend is the truth about what is valid here — the
|
|
|
+ rejection repeats it instead of leaving the user guessing."""
|
|
|
+ self._approval(adapter, choices_map={"✅": "once", "❌": "deny"})
|
|
|
+ adapter._chatto_client.post_message = AsyncMock(
|
|
|
+ return_value=_make_message(body="ack", message_id="ack-1")
|
|
|
+ )
|
|
|
+ await adapter._handle_realtime_event(self._event("🚀"))
|
|
|
+
|
|
|
+ body = adapter._chatto_client.post_message.await_args.kwargs["body"]
|
|
|
+ assert "✅ once" in body and "❌ deny" in body
|
|
|
+
|
|
|
|
|
|
# -- Prompt card threading --
|
|
|
|