test: clarify discord model picker nav assertions · openclaw/openclaw@da6231a
shakkernerd
·
2026-05-08
·
via Recent Commits to openclaw:main
File tree
extensions/discord/src/monitor
| Original file line number | Diff line number | Diff line change |
|---|
@@ -392,9 +392,8 @@ describe("Discord model picker rendering", () => {
|
392 | 392 | return parsed?.action === "provider"; |
393 | 393 | }); |
394 | 394 | expect(providerButtons).toHaveLength(Object.keys(entries).length); |
395 | | -expect(allButtons.some((component) => (component.custom_id ?? "").includes(";a=nav;"))).toBe( |
396 | | -false, |
397 | | -); |
| 395 | +const customIds = allButtons.map((component) => component.custom_id ?? ""); |
| 396 | +expect(customIds).not.toEqual(expect.arrayContaining([expect.stringContaining(";a=nav;")])); |
398 | 397 | }); |
399 | 398 | |
400 | 399 | it("does not render navigation buttons even when provider count exceeds one page", () => { |
@@ -419,9 +418,8 @@ describe("Discord model picker rendering", () => {
|
419 | 418 | expect(rows.length).toBeGreaterThan(0); |
420 | 419 | |
421 | 420 | const allButtons = rows.flatMap((row) => row.components ?? []); |
422 | | -expect(allButtons.some((component) => (component.custom_id ?? "").includes(";a=nav;"))).toBe( |
423 | | -false, |
424 | | -); |
| 421 | +const customIds = allButtons.map((component) => component.custom_id ?? ""); |
| 422 | +expect(customIds).not.toEqual(expect.arrayContaining([expect.stringContaining(";a=nav;")])); |
425 | 423 | }); |
426 | 424 | |
427 | 425 | it("supports classic fallback rendering with content + action rows", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。