test: update channel status label fixtures · openclaw/openclaw@5037298
shakkernerd
·
2026-04-26
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -31,7 +31,15 @@ type ChannelSectionConfig = {
|
31 | 31 | }; |
32 | 32 | |
33 | 33 | function formatChannelStatusJoined(channelAccounts: Record<string, unknown>) { |
34 | | -return formatGatewayChannelsStatusLines({ channelAccounts }).join("\n"); |
| 34 | +return formatGatewayChannelsStatusLines({ |
| 35 | +channelLabels: { |
| 36 | +discord: "Discord", |
| 37 | +signal: "Signal", |
| 38 | +telegram: "Telegram", |
| 39 | +whatsapp: "WhatsApp", |
| 40 | +}, |
| 41 | + channelAccounts, |
| 42 | +}).join("\n"); |
35 | 43 | } |
36 | 44 | |
37 | 45 | function listConfiguredAccountIds(channelConfig: ChannelSectionConfig | undefined): string[] { |
@@ -637,6 +645,10 @@ describe("channels command", () => {
|
637 | 645 | |
638 | 646 | it("formats gateway channel status lines in registry order", () => { |
639 | 647 | const lines = formatGatewayChannelsStatusLines({ |
| 648 | +channelLabels: { |
| 649 | +telegram: "Telegram", |
| 650 | +whatsapp: "WhatsApp", |
| 651 | +}, |
640 | 652 | channelAccounts: { |
641 | 653 | telegram: [{ accountId: "default", configured: true }], |
642 | 654 | whatsapp: [{ accountId: "default", linked: true }], |
@@ -756,6 +768,9 @@ describe("channels command", () => {
|
756 | 768 | |
757 | 769 | it("surfaces WhatsApp auth/runtime hints when unlinked or disconnected", () => { |
758 | 770 | const unlinked = formatGatewayChannelsStatusLines({ |
| 771 | +channelLabels: { |
| 772 | +whatsapp: "WhatsApp", |
| 773 | +}, |
759 | 774 | channelAccounts: { |
760 | 775 | whatsapp: [{ accountId: "default", enabled: true, linked: false }], |
761 | 776 | }, |
@@ -764,6 +779,9 @@ describe("channels command", () => {
|
764 | 779 | expect(unlinked.join("\n")).toMatch(/Not linked/i); |
765 | 780 | |
766 | 781 | const disconnected = formatGatewayChannelsStatusLines({ |
| 782 | +channelLabels: { |
| 783 | +whatsapp: "WhatsApp", |
| 784 | +}, |
767 | 785 | channelAccounts: { |
768 | 786 | whatsapp: [ |
769 | 787 | { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。