diff --git a/src/slack/monitor/slash.test.ts b/src/slack/monitor/slash.test.ts index 9e4cbd018b..8775c525cb 100644 --- a/src/slack/monitor/slash.test.ts +++ b/src/slack/monitor/slash.test.ts @@ -129,19 +129,12 @@ function createArgMenusHarness() { describe("Slack native command argument menus", () => { let harness: ReturnType; - let usageHandler: (args: unknown) => Promise; let argMenuHandler: (args: unknown) => Promise; beforeAll(async () => { harness = createArgMenusHarness(); await registerCommands(harness.ctx, harness.account); - const usage = harness.commands.get("/usage"); - if (!usage) { - throw new Error("Missing /usage handler"); - } - usageHandler = usage; - const argMenu = harness.actions.get("openclaw_cmdarg"); if (!argMenu) { throw new Error("Missing arg-menu action handler"); @@ -153,29 +146,6 @@ describe("Slack native command argument menus", () => { harness.postEphemeral.mockClear(); }); - it("shows a button menu when required args are omitted", async () => { - const respond = vi.fn().mockResolvedValue(undefined); - const ack = vi.fn().mockResolvedValue(undefined); - - await usageHandler({ - command: { - user_id: "U1", - user_name: "Ada", - channel_id: "C1", - channel_name: "directmessage", - text: "", - trigger_id: "t1", - }, - ack, - respond, - }); - - expect(respond).toHaveBeenCalledTimes(1); - const payload = respond.mock.calls[0]?.[0] as { blocks?: Array<{ type: string }> }; - expect(payload.blocks?.[0]?.type).toBe("section"); - expect(payload.blocks?.[1]?.type).toBe("actions"); - }); - it("dispatches the command when a menu button is clicked", async () => { const respond = vi.fn().mockResolvedValue(undefined); await argMenuHandler({