fix(e2e): follow scoped configure prompts

This commit is contained in:
Vincent Koc
2026-05-17 18:26:53 +08:00
parent 0165560f70
commit 10dd9c5aee
2 changed files with 13 additions and 7 deletions

View File

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

View File

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