mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-18 08:24:45 +00:00
fix(e2e): follow scoped configure prompts
This commit is contained in:
@@ -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}`);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user