From 11326badb2990b9112b6fa0b7ca356eb83a035bc Mon Sep 17 00:00:00 2001 From: VAIO73 <50487331+Vaso73@users.noreply.github.com> Date: Mon, 26 Oct 2026 05:44:22 +0000 Subject: [PATCH] test: preserve legacy terminal and update caller coverage --- tests/lxc_updates/test_observed_state_ui.cjs | 3 ++- tests/test_oci_update_cancellation.cjs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/lxc_updates/test_observed_state_ui.cjs b/tests/lxc_updates/test_observed_state_ui.cjs index 4f2de690..8df5c18b 100644 --- a/tests/lxc_updates/test_observed_state_ui.cjs +++ b/tests/lxc_updates/test_observed_state_ui.cjs @@ -138,7 +138,7 @@ const context = { invalidateLxcApps: () => {}, setSelectedVM: value => { context.selectionChanged = value }, alert: value => { context.alerted = value }, } -for (const name of ["Vmid", "Target", "RunId", "TargetIds", "TargetLabels", "UpdateCommand", "AppName", +for (const name of ["Vmid", "Target", "RunId", "Resume", "TargetIds", "TargetLabels", "UpdateCommand", "AppName", "RunHelper", "AllowHelperWithCustom", "DockerStandaloneTargets", "DockerEngine", "DockerRefresh", "BackupStorage", "StartedAt", "Open", "CheckAndUpdate", "CheckedOs"]) context[`setApply${name}`] = value => { context[`apply${name}`] = value } @@ -205,6 +205,7 @@ for (const [target, options] of [ context.applyOpen = false ui.openApply(100, target, options) assert.equal(context.applyOpen, true, `explicit ${target} update opens the terminal directly`) + assert.equal(context.applyResume, false, 'an explicitly started update is distinguished from attach-only recovery') } assert.equal(confirmationCalls, 0, 'ordinary update entry points never open a browser confirmation') assert(!source.includes('checkAndUpdate'), 'the abandoned combined check/install action has no UI path') diff --git a/tests/test_oci_update_cancellation.cjs b/tests/test_oci_update_cancellation.cjs index b91e77e2..5806c320 100644 --- a/tests/test_oci_update_cancellation.cjs +++ b/tests/test_oci_update_cancellation.cjs @@ -23,7 +23,7 @@ function executable(node, file, scope) { function fixture(handler, locale, optedIn=true) { const writes=[], callbacks=[], state={closed:0}; const t=translator(locale), terminal={write:s=>writes.push(s),writeln:s=>writes.push(s)}; - const shared={...completion, cancelledExitCode:optedIn?6:undefined,t, + const shared={...completion, backgroundUpdate:undefined, isOpenRef:{current:true}, cancelledExitCode:optedIn?6:undefined,t, completedSuccessfullyMessage:undefined,completedWithErrorMessage:undefined}; const getCompletionMessage=executable(messageCallback,source,shared); const scope={...shared,getCompletionMessage,term:terminal,termRef:{current:terminal},