mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 04:40:43 +00:00
test(qa): assert telegram streamed final count
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user