From 10dd9c5aee0aaa4d219e8b0e98d9733d01fcce6a Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sun, 17 May 2026 18:26:53 +0800 Subject: [PATCH] fix(e2e): follow scoped configure prompts --- scripts/e2e/lib/onboard/assert-config.mjs | 12 ++++++++++-- scripts/e2e/lib/onboard/scenario.sh | 8 +++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/scripts/e2e/lib/onboard/assert-config.mjs b/scripts/e2e/lib/onboard/assert-config.mjs index 3e3ce59ef02..0484a3cb60d 100644 --- a/scripts/e2e/lib/onboard/assert-config.mjs +++ b/scripts/e2e/lib/onboard/assert-config.mjs @@ -20,6 +20,14 @@ const assertLocalWizard = () => { expectEqual("wizard.lastRunMode", cfg?.wizard?.lastRunMode, "local"); }; +const assertSectionScopedConfigure = () => { + expectEqual("wizard.lastRunCommand", cfg?.wizard?.lastRunCommand, "configure"); + expectEqual("wizard.lastRunMode", cfg?.wizard?.lastRunMode, "local"); + if (cfg?.gateway?.mode) { + errors.push(`gateway.mode should stay unset (got ${cfg.gateway.mode})`); + } +}; + switch (scenario) { case "local-basic": { expectEqual("agents.defaults.workspace", cfg?.agents?.defaults?.workspace, expectedWorkspace); @@ -59,14 +67,14 @@ switch (scenario) { `slack tokens should be unset (got bot=${got(cfg?.slack?.botToken)}, app=${got(cfg?.slack?.appToken)})`, ); } - expectEqual("wizard.lastRunCommand", cfg?.wizard?.lastRunCommand, "configure"); + assertSectionScopedConfigure(); break; case "skills": expectEqual("skills.install.nodeManager", cfg?.skills?.install?.nodeManager, "bun"); if (!Array.isArray(cfg?.skills?.allowBundled) || cfg.skills.allowBundled[0] !== "__none__") { errors.push("skills.allowBundled missing"); } - assertLocalWizard(); + assertSectionScopedConfigure(); break; default: throw new Error(`unknown onboard assertion scenario: ${scenario}`); diff --git a/scripts/e2e/lib/onboard/scenario.sh b/scripts/e2e/lib/onboard/scenario.sh index d4c9fd4c7fe..5a1bc33f188 100644 --- a/scripts/e2e/lib/onboard/scenario.sh +++ b/scripts/e2e/lib/onboard/scenario.sh @@ -176,8 +176,7 @@ send_reset_config_only() { send_channels_flow() { # Configure channels via configure wizard. Use the remove-config branch for # a stable no-op smoke path when the config starts empty. - wait_for_log "Where will the Gateway run?" 120 - send $'\r' 0.6 + # Section-scoped configure flows skip gateway run-mode selection. wait_for_log "Channel setup" 120 send $'\e[B\r' 0.8 # Keep stdin open until wizard exits. @@ -185,9 +184,8 @@ send_channels_flow() { } send_skills_flow() { - # configure --section skills still runs the configure wizard. - wait_for_log "Where will the Gateway run?" 120 - send $'\r' 0.6 + # configure --section skills still runs the configure wizard, without the + # gateway run-mode prompt used by the full wizard. wait_for_log "Configure skills now?" 120 send $'n\r' 0.8 send "" 2.0