From f528a70a8f8a8ba5a05ff36f9a3ddc88831cdff6 Mon Sep 17 00:00:00 2001 From: Shakker Date: Mon, 11 May 2026 08:06:51 +0100 Subject: [PATCH] test: tighten nextcloud preflight assertions --- .../nextcloud-talk/src/bot-preflight.test.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/extensions/nextcloud-talk/src/bot-preflight.test.ts b/extensions/nextcloud-talk/src/bot-preflight.test.ts index 5d1c72df2f7..1a850fa036f 100644 --- a/extensions/nextcloud-talk/src/bot-preflight.test.ts +++ b/extensions/nextcloud-talk/src/bot-preflight.test.ts @@ -70,25 +70,24 @@ describe("probeNextcloudTalkBotResponseFeature", () => { it("passes when the matching bot has the response feature bit", async () => { mockBotAdmin(1 | 2 | 8); - await expect( - probeNextcloudTalkBotResponseFeature({ account: account() }), - ).resolves.toMatchObject({ + await expect(probeNextcloudTalkBotResponseFeature({ account: account() })).resolves.toEqual({ ok: true, code: "ok", botId: "7", + botName: "OpenClaw", features: 11, + message: 'Nextcloud Talk bot "OpenClaw" has the response feature.', }); }); it("reports missing response feature for the matching webhook bot", async () => { mockBotAdmin(1 | 8); - await expect( - probeNextcloudTalkBotResponseFeature({ account: account() }), - ).resolves.toMatchObject({ + await expect(probeNextcloudTalkBotResponseFeature({ account: account() })).resolves.toEqual({ ok: false, code: "missing_response_feature", botId: "7", + botName: "OpenClaw", features: 9, message: 'Nextcloud Talk bot "OpenClaw" (7) is missing the response feature (features=9); outbound replies will fail. Run ./occ talk:bot:state --feature webhook --feature response --feature reaction 7 1 or reinstall the bot with --feature response.', @@ -106,10 +105,12 @@ describe("probeNextcloudTalkBotResponseFeature", () => { }, }), }), - ).resolves.toMatchObject({ + ).resolves.toEqual({ ok: true, skipped: true, code: "missing_api_credentials", + message: + "Nextcloud Talk bot response feature probe skipped: apiUser/apiPassword are not configured.", }); expect(hoisted.fetchWithSsrFGuard).not.toHaveBeenCalled(); });