From 586c4530a506fb1e755e0cc3ab5644d1a33333d0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 10 May 2026 18:49:46 +0000 Subject: [PATCH] test(FN-66): stabilize remote provider activation assertion Agent-Logs-Url: https://github.com/Runfusion/Fusion/sessions/7f615374-c19b-4ab4-8869-f9181ee6cb90 Co-authored-by: gsxdsm <602584+gsxdsm@users.noreply.github.com> --- .../src/commands/dashboard-tui/__tests__/app.test.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/commands/dashboard-tui/__tests__/app.test.tsx b/packages/cli/src/commands/dashboard-tui/__tests__/app.test.tsx index 55b91b580..75d3443c6 100644 --- a/packages/cli/src/commands/dashboard-tui/__tests__/app.test.tsx +++ b/packages/cli/src/commands/dashboard-tui/__tests__/app.test.tsx @@ -429,7 +429,10 @@ describe("Settings view", () => { const controller = newController(); controller.setSystemInfo(makeSystemInfo()); let remoteState: "stopped" | "starting" | "running" | "error" = "running"; - const activateProvider = vi.fn(async () => {}); + let remoteProvider: "tailscale" | "cloudflare" | null = "tailscale"; + const activateProvider = vi.fn(async (provider: "tailscale" | "cloudflare") => { + remoteProvider = provider; + }); const settings: SettingsValues = { maxConcurrent: 1, maxWorktrees: 2, @@ -441,13 +444,13 @@ describe("Settings view", () => { remoteActiveProvider: "cloudflare", remoteShortLivedEnabled: true, remoteShortLivedTtlMs: 600000, - remoteStatus: { provider: "cloudflare", state: "running", url: "https://remote.example.com", lastError: null }, + remoteStatus: { provider: remoteProvider, state: "running", url: "https://remote.example.com", lastError: null }, }; controller.setInteractiveData(makeInteractiveData({ settings, remote: { activateProvider, - getStatus: async () => ({ provider: "cloudflare", state: remoteState, url: "https://remote.example.com", lastError: null }), + getStatus: async () => ({ provider: remoteProvider, state: remoteState, url: "https://remote.example.com", lastError: null }), startTunnel: async () => { remoteState = "starting"; },