From a37bbf61c01e0213bd74ff9c5ef8df1ccf86f990 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Wed, 11 Nov 2026 01:43:12 -0800 Subject: [PATCH] Keep regression return-value assertions within their action --- .../src/components/retained-bare-workspace.test.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/renderer/src/components/retained-bare-workspace.test.tsx b/src/renderer/src/components/retained-bare-workspace.test.tsx index 89bae2d37a2..63a101437c9 100644 --- a/src/renderer/src/components/retained-bare-workspace.test.tsx +++ b/src/renderer/src/components/retained-bare-workspace.test.tsx @@ -490,24 +490,21 @@ it('preserves unresolved browser ownership after restoring hostless content besi useAppStore.getState().unifiedTabsByWorktree[listed.id].find((tab) => tab.id === saved.id) ?.executionHostId ).toBeUndefined() - let explicitB: Tab | undefined act(() => { - explicitB = useAppStore.getState().createUnifiedTab(listed.id, 'agent-session', { + const explicitB = useAppStore.getState().createUnifiedTab(listed.id, 'agent-session', { id: 'b-chat', entityId: 'b-chat', label: 'B conversation', executionHostId: 'ssh:b', targetGroupId: 'twin-group' }) + expect(explicitB.executionHostId).toBe('ssh:b') }) - expect(explicitB?.executionHostId).toBe('ssh:b') const bResult = searchTabs('B conversation')[0] expect(bResult?.executionHostId).toBe('ssh:b') - let activation: ReturnType | undefined act(() => { - activation = activateWorkspaceTabPaletteResult(bResult) + expect(activateWorkspaceTabPaletteResult(bResult)).toEqual({ status: 'activated' }) }) - expect(activation?.status).toBe('activated') expect(useAppStore.getState().activeWorkspaceExecutionHostId).toBe('ssh:b') await act(async () => { await useAppStore.getState().openNewBrowserTabInActiveWorkspace('twin-group')