@@ -9,19 +9,16 @@ import { DEFAULT_ACCOUNT_ID, type OpenClawConfig } from "openclaw/plugin-sdk/set
99import { beforeEach , describe , expect , it , vi } from "vitest" ;
1010import { whatsappSetupWizard } from "./setup-surface.js" ;
1111import {
12- createWhatsAppAllowlistModeInput ,
1312 createWhatsAppLinkingHarness ,
1413 createWhatsAppOwnerAllowlistHarness ,
1514 createWhatsAppPersonalPhoneHarness ,
1615 createWhatsAppRootAllowFromConfig ,
1716 createWhatsAppWorkAccountConfig ,
1817 expectNoWhatsAppLoginFollowup ,
19- expectWhatsAppAllowlistModeSetup ,
2018 expectWhatsAppLoginFollowup ,
2119 expectWhatsAppOpenPolicySetup ,
2220 expectWhatsAppOwnerAllowlistSetup ,
2321 expectWhatsAppPersonalPhoneSetup ,
24- expectWhatsAppSeparatePhoneDisabledSetup ,
2522 expectWhatsAppWorkAccountAccessNote ,
2623 expectWhatsAppWorkAccountOpenAccess ,
2724} from "./setup-test-helpers.js" ;
@@ -138,20 +135,6 @@ function expectFinalizeResult(result: Awaited<ReturnType<typeof runFinalizeWithH
138135 return result as { cfg : OpenClawConfig } ;
139136}
140137
141- async function runSeparatePhoneFlow ( params : { selectValues : string [ ] ; textValues ?: string [ ] } ) {
142- hoisted . pathExists . mockResolvedValue ( true ) ;
143- const harness = createSeparatePhoneHarness ( {
144- selectValues : params . selectValues ,
145- textValues : params . textValues ,
146- } ) ;
147- const result = expectFinalizeResult (
148- await runFinalizeWithHarness ( {
149- harness,
150- } ) ,
151- ) ;
152- return { harness, result } ;
153- }
154-
155138describe ( "whatsapp setup wizard" , ( ) => {
156139 beforeEach ( ( ) => {
157140 hoisted . detectWhatsAppLinked . mockReset ( ) ;
@@ -186,14 +169,6 @@ describe("whatsapp setup wizard", () => {
186169 expectWhatsAppOwnerAllowlistSetup ( result . cfg , harness ) ;
187170 } ) ;
188171
189- it ( "supports disabled DM policy for separate-phone setup" , async ( ) => {
190- const { harness, result } = await runSeparatePhoneFlow ( {
191- selectValues : [ "separate" , "disabled" ] ,
192- } ) ;
193-
194- expectWhatsAppSeparatePhoneDisabledSetup ( result . cfg , harness ) ;
195- } ) ;
196-
197172 it ( "writes named-account DM policy and allowFrom instead of the channel root" , async ( ) => {
198173 hoisted . pathExists . mockResolvedValue ( true ) ;
199174 const harness = createSeparatePhoneHarness ( {
@@ -310,12 +285,6 @@ describe("whatsapp setup wizard", () => {
310285 expectWhatsAppWorkAccountAccessNote ( harness ) ;
311286 } ) ;
312287
313- it ( "normalizes allowFrom entries when list mode is selected" , async ( ) => {
314- const { result } = await runSeparatePhoneFlow ( createWhatsAppAllowlistModeInput ( ) ) ;
315-
316- expectWhatsAppAllowlistModeSetup ( result . cfg ) ;
317- } ) ;
318-
319288 it ( "enables allowlist self-chat mode for personal-phone setup" , async ( ) => {
320289 hoisted . pathExists . mockResolvedValue ( true ) ;
321290 const harness = createWhatsAppPersonalPhoneHarness ( createQueuedWizardPrompter ) ;
0 commit comments