惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
宝玉的分享
宝玉的分享
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
V
V2EX
Apple Machine Learning Research
Apple Machine Learning Research
J
Java Code Geeks
腾讯CDC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Engineering at Meta
Engineering at Meta
L
LangChain Blog
Jina AI
Jina AI
博客园 - 叶小钗
B
Blog RSS Feed
Recent Announcements
Recent Announcements
H
Help Net Security
小众软件
小众软件
大猫的无限游戏
大猫的无限游戏
B
Blog
云风的 BLOG
云风的 BLOG
Blog — PlanetScale
Blog — PlanetScale
D
DataBreaches.Net
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
罗磊的独立博客

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
test: tighten feishu bot menu assertions · openclaw/openc...
shakkernerd · 2026-05-11 · via Recent Commits to openclaw:main

@@ -79,19 +79,21 @@ describe("Feishu bot menu handler", () => {

79798080

await onBotMenu(createBotMenuEvent({ eventKey: "quick-actions", timestamp: "1700000000000" }));

818182-

expect(sendCardFeishuMock).toHaveBeenCalledWith(

83-

expect.objectContaining({

84-

to: "user:ou_user1",

85-

card: expect.objectContaining({

86-

config: expect.objectContaining({

87-

width_mode: "fill",

88-

}),

89-

header: expect.objectContaining({

90-

title: expect.objectContaining({ content: "Quick actions" }),

91-

}),

92-

}),

93-

}),

94-

);

82+

expect(sendCardFeishuMock).toHaveBeenCalledTimes(1);

83+

const sendArgs = sendCardFeishuMock.mock.calls[0]?.[0] as

84+

| {

85+

accountId?: string;

86+

card?: {

87+

config?: { width_mode?: string };

88+

header?: { title?: { content?: string } };

89+

};

90+

to?: string;

91+

}

92+

| undefined;

93+

expect(sendArgs?.to).toBe("user:ou_user1");

94+

expect(sendArgs?.accountId).toBe("default");

95+

expect(sendArgs?.card?.config?.width_mode).toBe("fill");

96+

expect(sendArgs?.card?.header?.title?.content).toBe("Quick actions");

9597

expect(handleFeishuMessageMock).not.toHaveBeenCalled();

9698

});

9799

@@ -126,15 +128,11 @@ describe("Feishu bot menu handler", () => {

126128127129

await onBotMenu(createBotMenuEvent({ eventKey: "custom-key", timestamp: "1700000000002" }));

128130129-

expect(handleFeishuMessageMock).toHaveBeenCalledWith(

130-

expect.objectContaining({

131-

event: expect.objectContaining({

132-

message: expect.objectContaining({

133-

content: '{"text":"/menu custom-key"}',

134-

}),

135-

}),

136-

}),

137-

);

131+

expect(handleFeishuMessageMock).toHaveBeenCalledTimes(1);

132+

const handleArgs = handleFeishuMessageMock.mock.calls[0]?.[0] as

133+

| { event?: { message?: { content?: string } } }

134+

| undefined;

135+

expect(handleArgs?.event?.message?.content).toBe('{"text":"/menu custom-key"}');

138136

expect(sendCardFeishuMock).not.toHaveBeenCalled();

139137

});

140138

@@ -145,16 +143,12 @@ describe("Feishu bot menu handler", () => {

145143

await onBotMenu(createBotMenuEvent({ eventKey: "quick-actions", timestamp: "1700000000003" }));

146144147145

await vi.waitFor(() => {

148-

expect(handleFeishuMessageMock).toHaveBeenCalledWith(

149-

expect.objectContaining({

150-

event: expect.objectContaining({

151-

message: expect.objectContaining({

152-

content: '{"text":"/menu quick-actions"}',

153-

}),

154-

}),

155-

}),

156-

);

146+

expect(handleFeishuMessageMock).toHaveBeenCalledTimes(1);

157147

});

148+

const handleArgs = handleFeishuMessageMock.mock.calls[0]?.[0] as

149+

| { event?: { message?: { content?: string } } }

150+

| undefined;

151+

expect(handleArgs?.event?.message?.content).toBe('{"text":"/menu quick-actions"}');

158152

expectFirstSentCardUsesFillWidthOnly(sendCardFeishuMock);

159153

});

160154