test(qa): assert telegram streamed final count

This commit is contained in:
Ayaan Zaidi
2026-05-05 22:43:16 +05:30
parent 512f777099
commit 748d6dc75e
2 changed files with 28 additions and 0 deletions

View File

@@ -333,6 +333,7 @@ describe("telegram live qa runtime", () => {
"telegram-context-command",
"telegram-current-session-status-tool",
"telegram-mentioned-message-reply",
"telegram-stream-final-single-message",
"telegram-long-final-reuses-preview",
"telegram-long-final-three-chunks",
"telegram-mention-gating",
@@ -345,6 +346,7 @@ describe("telegram live qa runtime", () => {
"telegram-context-command",
"telegram-current-session-status-tool",
"telegram-mentioned-message-reply",
"telegram-stream-final-single-message",
"telegram-long-final-reuses-preview",
"telegram-long-final-three-chunks",
"telegram-mention-gating",
@@ -359,6 +361,15 @@ describe("telegram live qa runtime", () => {
.find((scenario) => scenario.id === "telegram-mentioned-message-reply")
?.buildRun("sut_bot").replyToLatestSutMessage,
).toBe(true);
expect(
scenarios
.find((scenario) => scenario.id === "telegram-stream-final-single-message")
?.buildRun("sut_bot"),
).toMatchObject({
expectedJoinedSutTextIncludes: ["QA-TELEGRAM-STREAM-SINGLE-OK"],
expectedSutMessageCount: 1,
replyToLatestSutMessage: true,
});
expect(
scenarios
.find((scenario) => scenario.id === "telegram-long-final-reuses-preview")

View File

@@ -48,6 +48,7 @@ type TelegramQaScenarioId =
| "telegram-whoami-command"
| "telegram-context-command"
| "telegram-current-session-status-tool"
| "telegram-stream-final-single-message"
| "telegram-long-final-three-chunks"
| "telegram-long-final-reuses-preview"
| "telegram-mentioned-message-reply"
@@ -300,6 +301,22 @@ const TELEGRAM_QA_SCENARIOS: TelegramQaScenarioDefinition[] = [
replyToLatestSutMessage: true,
}),
},
{
id: "telegram-stream-final-single-message",
title: "Telegram streamed final stays one message",
defaultEnabled: false,
timeoutMs: 45_000,
buildRun: (sutUsername) => ({
allowAnySutReply: true,
expectReply: true,
input: `@${sutUsername} Quiet streaming QA check. Reply exactly: QA-TELEGRAM-STREAM-SINGLE-OK`,
expectedTextIncludes: ["QA-TELEGRAM-STREAM-SINGLE-OK"],
expectedJoinedSutTextIncludes: ["QA-TELEGRAM-STREAM-SINGLE-OK"],
expectedSutMessageCount: 1,
replyToLatestSutMessage: true,
settleMs: 4_000,
}),
},
{
id: "telegram-long-final-reuses-preview",
title: "Telegram long final reuses the preview message",