|
3 | 3 | import React from "react" |
4 | 4 | import { render, fireEvent, waitFor, act } from "@/utils/test-utils" |
5 | 5 |
|
6 | | -import type { StatsBucket, StatsSnapshot, SessionSummary, SessionDetail } from "@roo-code/types" |
| 6 | +import type { StatsBucket, StatsSnapshot, SessionSummary } from "@roo-code/types" |
7 | 7 |
|
8 | 8 | import DashboardView from "../DashboardView" |
9 | 9 |
|
@@ -172,14 +172,6 @@ function makeSession(overrides: Partial<SessionSummary> = {}): SessionSummary { |
172 | 172 | } |
173 | 173 | } |
174 | 174 |
|
175 | | -function makeSessionDetail(overrides: Partial<SessionDetail> = {}): SessionDetail { |
176 | | - return { |
177 | | - ...makeSession(), |
178 | | - apiCalls: [], |
179 | | - ...overrides, |
180 | | - } |
181 | | -} |
182 | | - |
183 | 175 | // ── Helpers ────────────────────────────────────────────────────────────────── |
184 | 176 |
|
185 | 177 | /** |
@@ -237,28 +229,6 @@ function simulateSessionsResponse( |
237 | 229 | window.dispatchEvent(new MessageEvent("message", { data })) |
238 | 230 | } |
239 | 231 |
|
240 | | -/** |
241 | | - * Simulates the extension host responding to a getDashboardSessionDetail request. |
242 | | - */ |
243 | | -function simulateSessionDetailResponse( |
244 | | - detail: SessionDetail | null, |
245 | | - error?: string, |
246 | | - requestId?: string, |
247 | | -) { |
248 | | - const rid = requestId ?? getLatestRequestIdByType("getDashboardSessionDetail") |
249 | | - const data: Record<string, unknown> = { |
250 | | - type: "dashboardSessionDetailResponse", |
251 | | - requestId: rid, |
252 | | - } |
253 | | - if (detail !== null) { |
254 | | - data.dashboardSessionDetail = detail |
255 | | - } else { |
256 | | - data.dashboardSessionDetail = null |
257 | | - if (error) data.error = error |
258 | | - } |
259 | | - window.dispatchEvent(new MessageEvent("message", { data })) |
260 | | -} |
261 | | - |
262 | 232 | /** |
263 | 233 | * Simulates a requestClearNonceResponse from the host. |
264 | 234 | */ |
|
0 commit comments