test(e2e): follow quickstart hook defaults

This commit is contained in:
Vincent Koc
2026-07-05 09:29:02 +02:00
parent f4908e60fd
commit 51255f66eb
2 changed files with 11 additions and 3 deletions
@@ -105,6 +105,14 @@ function assertOpenAiEnvRef() {
assert(!readStateText().includes(rawKey), "raw OpenAI key was persisted");
}
function assertSessionMemoryHookEnabled() {
const cfg = readJson(configPath());
assert(
cfg.hooks?.internal?.entries?.["session-memory"]?.enabled === true,
"session-memory hook was not enabled",
);
}
function assertAgentTurn() {
const marker = process.argv[3];
const outputPath = process.argv[4];
@@ -199,6 +207,7 @@ function assertPluginUninstalled() {
const commands = {
"configure-mock-openai": configureMockOpenAi,
"assert-openai-env-ref": assertOpenAiEnvRef,
"assert-session-memory-hook-enabled": assertSessionMemoryHookEnabled,
"assert-agent-turn": assertAgentTurn,
"assert-file-contains": assertFileContains,
"assert-package-version": assertPackageVersion,
@@ -107,9 +107,6 @@ wait_for_log "Continue?" 60
send $'y\r' 0.4
wait_for_log "to search" 60
send $'ollama\r' 0.4
wait_for_log "Enable hooks?" 60
send $' \r' 0.4
send $'\r' 0.4
wait "$wizard_pid"
wizard_pid=""
@@ -117,6 +114,8 @@ exec 3>&-
rm -rf "$input_fifo_dir"
input_fifo_dir=""
node scripts/e2e/lib/release-scenarios/assertions.mjs assert-session-memory-hook-enabled
openclaw onboard \
--non-interactive \
--accept-risk \