mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-25 03:45:46 -06:00
test(plugins): remove duplicate setup cases (#122515)
This commit is contained in:
committed by
GitHub
parent
83bca68440
commit
fc0147b529
@@ -179,13 +179,6 @@ describe("Codex agent harness supports()", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("supports the canonical openai routing id (documented Codex path)", () => {
|
||||
expect(harness.supports({ provider: "openai", requestedRuntime: "codex" })).toEqual({
|
||||
supported: true,
|
||||
priority: 100,
|
||||
});
|
||||
});
|
||||
|
||||
it("supports an official route declared compatible with Codex", () => {
|
||||
expect(
|
||||
harness.supports({
|
||||
|
||||
@@ -9,19 +9,16 @@ import { DEFAULT_ACCOUNT_ID, type OpenClawConfig } from "openclaw/plugin-sdk/set
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { whatsappSetupWizard } from "./setup-surface.js";
|
||||
import {
|
||||
createWhatsAppAllowlistModeInput,
|
||||
createWhatsAppLinkingHarness,
|
||||
createWhatsAppOwnerAllowlistHarness,
|
||||
createWhatsAppPersonalPhoneHarness,
|
||||
createWhatsAppRootAllowFromConfig,
|
||||
createWhatsAppWorkAccountConfig,
|
||||
expectNoWhatsAppLoginFollowup,
|
||||
expectWhatsAppAllowlistModeSetup,
|
||||
expectWhatsAppLoginFollowup,
|
||||
expectWhatsAppOpenPolicySetup,
|
||||
expectWhatsAppOwnerAllowlistSetup,
|
||||
expectWhatsAppPersonalPhoneSetup,
|
||||
expectWhatsAppSeparatePhoneDisabledSetup,
|
||||
expectWhatsAppWorkAccountAccessNote,
|
||||
expectWhatsAppWorkAccountOpenAccess,
|
||||
} from "./setup-test-helpers.js";
|
||||
@@ -138,20 +135,6 @@ function expectFinalizeResult(result: Awaited<ReturnType<typeof runFinalizeWithH
|
||||
return result as { cfg: OpenClawConfig };
|
||||
}
|
||||
|
||||
async function runSeparatePhoneFlow(params: { selectValues: string[]; textValues?: string[] }) {
|
||||
hoisted.pathExists.mockResolvedValue(true);
|
||||
const harness = createSeparatePhoneHarness({
|
||||
selectValues: params.selectValues,
|
||||
textValues: params.textValues,
|
||||
});
|
||||
const result = expectFinalizeResult(
|
||||
await runFinalizeWithHarness({
|
||||
harness,
|
||||
}),
|
||||
);
|
||||
return { harness, result };
|
||||
}
|
||||
|
||||
describe("whatsapp setup wizard", () => {
|
||||
beforeEach(() => {
|
||||
hoisted.detectWhatsAppLinked.mockReset();
|
||||
@@ -186,14 +169,6 @@ describe("whatsapp setup wizard", () => {
|
||||
expectWhatsAppOwnerAllowlistSetup(result.cfg, harness);
|
||||
});
|
||||
|
||||
it("supports disabled DM policy for separate-phone setup", async () => {
|
||||
const { harness, result } = await runSeparatePhoneFlow({
|
||||
selectValues: ["separate", "disabled"],
|
||||
});
|
||||
|
||||
expectWhatsAppSeparatePhoneDisabledSetup(result.cfg, harness);
|
||||
});
|
||||
|
||||
it("writes named-account DM policy and allowFrom instead of the channel root", async () => {
|
||||
hoisted.pathExists.mockResolvedValue(true);
|
||||
const harness = createSeparatePhoneHarness({
|
||||
@@ -310,12 +285,6 @@ describe("whatsapp setup wizard", () => {
|
||||
expectWhatsAppWorkAccountAccessNote(harness);
|
||||
});
|
||||
|
||||
it("normalizes allowFrom entries when list mode is selected", async () => {
|
||||
const { result } = await runSeparatePhoneFlow(createWhatsAppAllowlistModeInput());
|
||||
|
||||
expectWhatsAppAllowlistModeSetup(result.cfg);
|
||||
});
|
||||
|
||||
it("enables allowlist self-chat mode for personal-phone setup", async () => {
|
||||
hoisted.pathExists.mockResolvedValue(true);
|
||||
const harness = createWhatsAppPersonalPhoneHarness(createQueuedWizardPrompter);
|
||||
|
||||
Reference in New Issue
Block a user