test: announce slash option exactly · openclaw/openclaw@706b9a2
shakkernerd
·
2026-05-13
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -725,7 +725,14 @@ describe("chat slash menu accessibility", () => {
|
725 | 725 | if (!announcementText) { |
726 | 726 | throw new Error("Expected command navigation to update the live announcement"); |
727 | 727 | } |
728 | | -expect(announcementText).toContain(activeOption?.textContent?.trim().split(/\s+/u)[0]); |
| 728 | +const expectedAnnouncement = [ |
| 729 | +activeOption?.querySelector(".slash-menu-name")?.textContent?.trim(), |
| 730 | +activeOption?.querySelector(".slash-menu-args")?.textContent?.trim(), |
| 731 | +activeOption?.querySelector(".slash-menu-desc")?.textContent?.trim(), |
| 732 | +] |
| 733 | +.filter(Boolean) |
| 734 | +.join(" "); |
| 735 | +expect(announcementText).toBe(expectedAnnouncement); |
729 | 736 | }); |
730 | 737 | |
731 | 738 | it("wires fixed argument suggestions with command-and-argument option ids", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。