mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 19:38:28 +00:00
test: stabilize CLI hint assertions under CLAWDBOT_PROFILE (#2507)
This commit is contained in:
@@ -370,7 +370,7 @@ describe("channels command", () => {
|
||||
});
|
||||
expect(lines.join("\n")).toMatch(/Warnings:/);
|
||||
expect(lines.join("\n")).toMatch(/Message Content Intent is disabled/i);
|
||||
expect(lines.join("\n")).toMatch(/Run: clawdbot doctor/);
|
||||
expect(lines.join("\n")).toMatch(/Run: clawdbot( --profile isolated)? doctor/);
|
||||
});
|
||||
|
||||
it("surfaces Discord permission audit issues in channels status output", () => {
|
||||
|
||||
@@ -234,6 +234,8 @@ describe("buildGatewayInstallPlan", () => {
|
||||
describe("gatewayInstallErrorHint", () => {
|
||||
it("returns platform-specific hints", () => {
|
||||
expect(gatewayInstallErrorHint("win32")).toContain("Run as administrator");
|
||||
expect(gatewayInstallErrorHint("linux")).toContain("clawdbot gateway install");
|
||||
expect(gatewayInstallErrorHint("linux")).toMatch(
|
||||
/clawdbot( --profile isolated)? gateway install/,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -239,7 +239,7 @@ describe("onboard-hooks", () => {
|
||||
|
||||
// Second note should confirm configuration
|
||||
expect(noteCalls[1][0]).toContain("Enabled 1 hook: session-memory");
|
||||
expect(noteCalls[1][0]).toContain("clawdbot hooks list");
|
||||
expect(noteCalls[1][0]).toMatch(/clawdbot( --profile isolated)? hooks list/);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -130,7 +130,7 @@ describe("sandboxListCommand", () => {
|
||||
|
||||
expectLogContains(runtime, "⚠️");
|
||||
expectLogContains(runtime, "image mismatch");
|
||||
expectLogContains(runtime, "clawdbot sandbox recreate --all");
|
||||
expectLogContains(runtime, "sandbox recreate --all");
|
||||
});
|
||||
|
||||
it("should display message when no containers found", async () => {
|
||||
|
||||
@@ -312,7 +312,13 @@ describe("statusCommand", () => {
|
||||
expect(logs.some((l) => l.includes("FAQ:"))).toBe(true);
|
||||
expect(logs.some((l) => l.includes("Troubleshooting:"))).toBe(true);
|
||||
expect(logs.some((l) => l.includes("Next steps:"))).toBe(true);
|
||||
expect(logs.some((l) => l.includes("clawdbot status --all"))).toBe(true);
|
||||
expect(
|
||||
logs.some(
|
||||
(l) =>
|
||||
l.includes("clawdbot status --all") ||
|
||||
l.includes("clawdbot --profile isolated status --all"),
|
||||
),
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
it("shows gateway auth when reachable", async () => {
|
||||
|
||||
Reference in New Issue
Block a user