test: spell out configure install records

This commit is contained in:
Shakker
2026-05-11 18:00:33 +01:00
parent d79a585878
commit a2a32f7d0a
2 changed files with 16 additions and 3 deletions

View File

@@ -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);

View File

@@ -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",