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

推荐订阅源

月光博客
月光博客
C
Check Point Blog
J
Java Code Geeks
腾讯CDC
Apple Machine Learning Research
Apple Machine Learning Research
宝玉的分享
宝玉的分享
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
量子位
Google DeepMind News
Google DeepMind News
I
InfoQ
The GitHub Blog
The GitHub Blog
aimingoo的专栏
aimingoo的专栏
N
Netflix TechBlog - Medium
Hugging Face - Blog
Hugging Face - Blog
博客园 - Franky
V
V2EX
Blog — PlanetScale
Blog — PlanetScale
T
The Blog of Author Tim Ferriss
小众软件
小众软件
博客园_首页
人人都是产品经理
人人都是产品经理
博客园 - 聂微东
IT之家
IT之家

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 send parsing assertions · openclaw/o...
shakkernerd · 2026-05-11 · via Recent Commits to openclaw:main

@@ -168,14 +168,18 @@ describe("getMessageFeishu", () => {

168168

messageId: "om_1",

169169

});

170170171-

expect(result).toEqual(

172-

expect.objectContaining({

173-

messageId: "om_1",

174-

chatId: "oc_1",

175-

contentType: "interactive",

176-

content: "hello markdown\nhello div",

177-

}),

178-

);

171+

expect(result).toEqual({

172+

messageId: "om_1",

173+

chatId: "oc_1",

174+

chatType: undefined,

175+

senderId: undefined,

176+

senderOpenId: undefined,

177+

senderType: undefined,

178+

content: "hello markdown\nhello div",

179+

contentType: "interactive",

180+

createTime: undefined,

181+

threadId: undefined,

182+

});

179183

});

180184181185

it("falls through empty interactive card element arrays and locale variants", async () => {

@@ -217,14 +221,18 @@ describe("getMessageFeishu", () => {

217221

messageId: "om_i18n_card",

218222

});

219223220-

expect(result).toEqual(

221-

expect.objectContaining({

222-

messageId: "om_i18n_card",

223-

chatId: "oc_i18n_card",

224-

contentType: "interactive",

225-

content: "hello 2 tasks {{metadata}}",

226-

}),

227-

);

224+

expect(result).toEqual({

225+

messageId: "om_i18n_card",

226+

chatId: "oc_i18n_card",

227+

chatType: undefined,

228+

senderId: undefined,

229+

senderOpenId: undefined,

230+

senderType: undefined,

231+

content: "hello 2 tasks {{metadata}}",

232+

contentType: "interactive",

233+

createTime: undefined,

234+

threadId: undefined,

235+

});

228236

});

229237230238

it("falls back to post-format content when interactive card elements are empty", async () => {

@@ -257,14 +265,18 @@ describe("getMessageFeishu", () => {

257265

messageId: "om_post_card",

258266

});

259267260-

expect(result).toEqual(

261-

expect.objectContaining({

262-

messageId: "om_post_card",

263-

chatId: "oc_post_card",

264-

contentType: "interactive",

265-

content: "Card summary\n\n**fallback** body",

266-

}),

267-

);

268+

expect(result).toEqual({

269+

messageId: "om_post_card",

270+

chatId: "oc_post_card",

271+

chatType: undefined,

272+

senderId: undefined,

273+

senderOpenId: undefined,

274+

senderType: undefined,

275+

content: "Card summary\n\n**fallback** body",

276+

contentType: "interactive",

277+

createTime: undefined,

278+

threadId: undefined,

279+

});

268280

});

269281270282

it("extracts text content from post messages", async () => {

@@ -294,14 +306,18 @@ describe("getMessageFeishu", () => {

294306

messageId: "om_post",

295307

});

296308297-

expect(result).toEqual(

298-

expect.objectContaining({

299-

messageId: "om_post",

300-

chatId: "oc_post",

301-

contentType: "post",

302-

content: "Summary\n\npost body",

303-

}),

304-

);

309+

expect(result).toEqual({

310+

messageId: "om_post",

311+

chatId: "oc_post",

312+

chatType: undefined,

313+

senderId: undefined,

314+

senderOpenId: undefined,

315+

senderType: undefined,

316+

content: "Summary\n\npost body",

317+

contentType: "post",

318+

createTime: undefined,

319+

threadId: undefined,

320+

});

305321

});

306322307323

it("returns text placeholder instead of raw JSON for unsupported message types", async () => {

@@ -326,14 +342,18 @@ describe("getMessageFeishu", () => {

326342

messageId: "om_file",

327343

});

328344329-

expect(result).toEqual(

330-

expect.objectContaining({

331-

messageId: "om_file",

332-

chatId: "oc_file",

333-

contentType: "file",

334-

content: "[file message]",

335-

}),

336-

);

345+

expect(result).toEqual({

346+

messageId: "om_file",

347+

chatId: "oc_file",

348+

chatType: undefined,

349+

senderId: undefined,

350+

senderOpenId: undefined,

351+

senderType: undefined,

352+

content: "[file message]",

353+

contentType: "file",

354+

createTime: undefined,

355+

threadId: undefined,

356+

});

337357

});

338358339359

it("supports single-object response shape from Feishu API", async () => {

@@ -354,14 +374,18 @@ describe("getMessageFeishu", () => {

354374

messageId: "om_single",

355375

});

356376357-

expect(result).toEqual(

358-

expect.objectContaining({

359-

messageId: "om_single",

360-

chatId: "oc_single",

361-

contentType: "text",

362-

content: "single payload",

363-

}),

364-

);

377+

expect(result).toEqual({

378+

messageId: "om_single",

379+

chatId: "oc_single",

380+

chatType: undefined,

381+

senderId: undefined,

382+

senderOpenId: undefined,

383+

senderType: undefined,

384+

content: "single payload",

385+

contentType: "text",

386+

createTime: undefined,

387+

threadId: undefined,

388+

});

365389

});

366390367391

it("reuses the same content parsing for thread history messages", async () => {

@@ -415,16 +439,22 @@ describe("getMessageFeishu", () => {

415439

});

416440417441

expect(result).toEqual([

418-

expect.objectContaining({

442+

{

419443

messageId: "om_file",

444+

senderId: "ou_1",

445+

senderType: "user",

420446

contentType: "file",

421447

content: "[file message]",

422-

}),

423-

expect.objectContaining({

448+

createTime: 1710000001000,

449+

},

450+

{

424451

messageId: "om_card",

452+

senderId: "app_1",

453+

senderType: "app",

425454

contentType: "interactive",

426455

content: "hello from card 2.0",

427-

}),

456+

createTime: 1710000000000,

457+

},

428458

]);

429459

});

430460

});

@@ -547,13 +577,14 @@ describe("buildStructuredCard", () => {

547577

},

548578

});

549579550-

expect(card).toEqual(

551-

expect.objectContaining({

552-

header: {

553-

title: { tag: "plain_text", content: "Agent" },

554-

template: "blue",

555-

},

556-

}),

557-

);

580+

expect(card).toEqual({

581+

schema: "2.0",

582+

config: { width_mode: "fill" },

583+

body: { elements: [{ tag: "markdown", content: "hello" }] },

584+

header: {

585+

title: { tag: "plain_text", content: "Agent" },

586+

template: "blue",

587+

},

588+

});

558589

});

559590

});