From a2a32f7d0a0770104fdbdb6f58ea5aac5d893f7f Mon Sep 17 00:00:00 2001 From: Shakker Date: Mon, 11 May 2026 18:00:33 +0100 Subject: [PATCH] test: spell out configure install records --- src/commands/configure.wizard.test.ts | 6 ++++-- src/commands/onboarding-plugin-install.test.ts | 13 ++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/commands/configure.wizard.test.ts b/src/commands/configure.wizard.test.ts index 836adf35f97..4d4353827de 100644 --- a/src/commands/configure.wizard.test.ts +++ b/src/commands/configure.wizard.test.ts @@ -355,9 +355,11 @@ describe("runConfigureWizard", () => { await expect(runWebConfigureWizard()).resolves.toBeUndefined(); expect(mocks.note).toHaveBeenCalledWith( - expect.stringContaining( + [ "No web search providers are currently available under this plugin policy.", - ), + "Enable plugins or remove deny rules, then rerun configure.", + "Docs: https://docs.openclaw.ai/tools/web", + ].join("\n"), "Web search", ); expect(getWebSearch(requireWriteConfig()).enabled).toBe(false); diff --git a/src/commands/onboarding-plugin-install.test.ts b/src/commands/onboarding-plugin-install.test.ts index b131f14191f..208be2b325c 100644 --- a/src/commands/onboarding-plugin-install.test.ts +++ b/src/commands/onboarding-plugin-install.test.ts @@ -1179,7 +1179,18 @@ describe("ensureOnboardingPluginInstalled", () => { workspaceDir, }); - expect(recordPluginInstall).toHaveBeenCalledWith(expect.anything(), { + const [recordCfg, recordUpdate] = readFirstMockCall( + recordPluginInstall, + "recordPluginInstall", + ) as [OpenClawConfig, PluginInstallRecord]; + expect(recordCfg).toEqual({ + plugins: { + load: { + paths: [realPluginDir], + }, + }, + }); + expect(recordUpdate).toEqual({ pluginId: "demo-plugin", source: "path", sourcePath: "./plugins/demo",