Skip to content

Commit b1002a6

Browse files
committed
test: align internal wake integration expectations
1 parent ede8dd4 commit b1002a6

4 files changed

Lines changed: 11 additions & 5 deletions

File tree

‎extensions/qa-lab/src/cli.runtime.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2263,6 +2263,7 @@ describe("qa cli runtime", () => {
22632263
"runtime-tool-tavily-extract",
22642264
"runtime-tool-tavily-search",
22652265
"runtime-tool-tts",
2266+
"internal-event-subagent-spawn-live",
22662267
],
22672268
});
22682269
expectWriteContains(

‎extensions/qa-lab/src/scenario-catalog.runtime-pair.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe("QA runtime-pair scenario catalog", () => {
2121
.length,
2222
]),
2323
);
24-
expect(laneCounts).toEqual({ core: 35, extended: 8, soak: 2 });
24+
expect(laneCounts).toEqual({ core: 35, extended: 9, soak: 2 });
2525
});
2626

2727
it("declares every release agentic scenario in the core lane", () => {

‎src/agents/cli-runner/prepare.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3376,7 +3376,7 @@ describe("prepareCliRunContext", () => {
33763376
workspaceDir: context.workspaceDir,
33773377
modelProvider: "anthropic",
33783378
modelId: "test-model",
3379-
messageProvider: "discord",
3379+
messageProvider: "telegram",
33803380
clientCaps: ["tool-events", "inline-widgets"],
33813381
currentChannelId: "telegram:-100123:topic:42",
33823382
currentThreadTs: "42",
@@ -3482,7 +3482,7 @@ describe("prepareCliRunContext", () => {
34823482
senderName: "Canonical Name",
34833483
senderUsername: "canonical-user",
34843484
senderE164: "+15551234567",
3485-
messageProvider: "discord",
3485+
messageProvider: "telegram",
34863486
groupId: "chat123",
34873487
groupChannel: "ops",
34883488
groupSpace: "workspace-a",

‎src/cron/service.wake-now-real-heartbeat.test.ts‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import path from "node:path";
44
import { afterEach, describe, expect, it, vi } from "vitest";
55
import { useAutoCleanupTempDirTracker } from "../../test/helpers/temp-dir.js";
6+
import type { MsgContext } from "../auto-reply/templating.js";
67
import type { OpenClawConfig } from "../config/config.js";
78
import { resolveAgentMainSessionKey } from "../config/sessions.js";
89
import { runHeartbeatOnce } from "../infra/heartbeat-runner.js";
@@ -157,8 +158,12 @@ async function runMainCronCase(mode: WakeNowRunMode, wakeMode: "now" | "next-hea
157158
expect(getReplySpy).toHaveBeenCalledTimes(1);
158159

159160
const [ctx] = getReplySpy.mock.calls[0] ?? [];
160-
const replyCtx = ctx as { Provider?: string; SessionKey?: string; Body?: string };
161-
expect(replyCtx.Provider).toBe("cron-event");
161+
const replyCtx = ctx as Pick<
162+
MsgContext,
163+
"InternalTurnSource" | "Provider" | "SessionKey" | "Body"
164+
>;
165+
expect(replyCtx.InternalTurnSource).toBe("cron");
166+
expect(replyCtx.Provider).toBeUndefined();
162167
expect(replyCtx.SessionKey).toBe(expectedMainSessionKey);
163168
expect(replyCtx.Body).toContain("Reminder: Send the nightly report");
164169
expect(peekSystemEventEntries(expectedMainSessionKey)).toHaveLength(0);

0 commit comments

Comments
 (0)