test: update channel status label fixtures

This commit is contained in:
Shakker
2026-04-26 09:00:58 +01:00
parent 0a82c819bb
commit 5037298d82
2 changed files with 25 additions and 1 deletions

View File

@@ -31,7 +31,15 @@ type ChannelSectionConfig = {
};
function formatChannelStatusJoined(channelAccounts: Record<string, unknown>) {
return formatGatewayChannelsStatusLines({ channelAccounts }).join("\n");
return formatGatewayChannelsStatusLines({
channelLabels: {
discord: "Discord",
signal: "Signal",
telegram: "Telegram",
whatsapp: "WhatsApp",
},
channelAccounts,
}).join("\n");
}
function listConfiguredAccountIds(channelConfig: ChannelSectionConfig | undefined): string[] {
@@ -637,6 +645,10 @@ describe("channels command", () => {
it("formats gateway channel status lines in registry order", () => {
const lines = formatGatewayChannelsStatusLines({
channelLabels: {
telegram: "Telegram",
whatsapp: "WhatsApp",
},
channelAccounts: {
telegram: [{ accountId: "default", configured: true }],
whatsapp: [{ accountId: "default", linked: true }],
@@ -756,6 +768,9 @@ describe("channels command", () => {
it("surfaces WhatsApp auth/runtime hints when unlinked or disconnected", () => {
const unlinked = formatGatewayChannelsStatusLines({
channelLabels: {
whatsapp: "WhatsApp",
},
channelAccounts: {
whatsapp: [{ accountId: "default", enabled: true, linked: false }],
},
@@ -764,6 +779,9 @@ describe("channels command", () => {
expect(unlinked.join("\n")).toMatch(/Not linked/i);
const disconnected = formatGatewayChannelsStatusLines({
channelLabels: {
whatsapp: "WhatsApp",
},
channelAccounts: {
whatsapp: [
{

View File

@@ -33,6 +33,9 @@ describe("channels command", () => {
it("surfaces Signal runtime errors in channels status output", () => {
const lines = formatGatewayChannelsStatusLines({
channelLabels: {
signal: "Signal",
},
channelAccounts: {
signal: [
{
@@ -61,6 +64,9 @@ describe("channels command", () => {
]),
);
const lines = formatGatewayChannelsStatusLines({
channelLabels: {
imessage: "iMessage",
},
channelAccounts: {
imessage: [
{