From ddec93b7e77e20d75fb982ca54e8aa430abaa934 Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Sun, 6 Sep 2026 08:56:08 -0700 Subject: [PATCH] test: reconnect after replacing same-ID runtime pairing --- tests/e2e/helpers/nested-runtime-same-id-pairing.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/e2e/helpers/nested-runtime-same-id-pairing.ts b/tests/e2e/helpers/nested-runtime-same-id-pairing.ts index 5e13630de80..2d8e7d99d6d 100644 --- a/tests/e2e/helpers/nested-runtime-same-id-pairing.ts +++ b/tests/e2e/helpers/nested-runtime-same-id-pairing.ts @@ -28,6 +28,10 @@ export async function replaceRuntimePairingInPlace(args: { if (!store) { throw new Error('Paired desktop store is unavailable during same-ID re-pair') } + const connection = await window.api.runtimeEnvironments.connect({ selector }) + if (!connection.ok) { + throw new Error(`Same-ID re-pair reconnect failed: ${JSON.stringify(connection.error)}`) + } const environments = await window.api.runtimeEnvironments.list() store.getState().setRuntimeEnvironments(environments) if (!(await store.getState().refreshRuntimeEnvironmentStatus(selector))) {