Tests: fix current check failures

This commit is contained in:
Tak Hoffman
2026-03-18 22:56:58 -05:00
parent 74756b91b7
commit 126839380c
9 changed files with 55 additions and 26 deletions

View File

@@ -58,11 +58,15 @@ function createHost() {
sessionKey: "main",
lastActiveSessionKey: "main",
theme: "system",
themeMode: "system",
chatFocusMode: false,
chatShowThinking: true,
chatShowToolCalls: true,
splitRatio: 0.6,
navCollapsed: false,
navWidth: 280,
navGroupsCollapsed: {},
borderRadius: 50,
},
password: "",
clientInstanceId: "instance-test",
@@ -83,6 +87,9 @@ function createHost() {
toolsCatalogLoading: false,
toolsCatalogError: null,
toolsCatalogResult: null,
healthLoading: false,
healthResult: null,
healthError: null,
debugHealth: null,
assistantName: "OpenClaw",
assistantAvatar: null,
@@ -94,7 +101,7 @@ function createHost() {
execApprovalQueue: [],
execApprovalError: null,
updateAvailable: null,
} as Parameters<typeof handleGatewayEvent>[0];
} as unknown as Parameters<typeof handleGatewayEvent>[0];
}
describe("handleGatewayEvent sessions.changed", () => {
@@ -103,6 +110,7 @@ describe("handleGatewayEvent sessions.changed", () => {
const host = createHost();
handleGatewayEvent(host, {
type: "event",
event: "sessions.changed",
payload: { sessionKey: "agent:main:main", reason: "patch" },
seq: 1,