From 9eae6554534ff04529da9ff1f16fd5f313f6368f Mon Sep 17 00:00:00 2001 From: mptyl Date: Mon, 29 Jun 2026 21:52:37 +0200 Subject: [PATCH] style(frontend): move AppShell test imports to top (merge act, add useSessionStore) Co-Authored-By: Claude Opus 4.8 --- frontend/src/shell/AppShell.session-mgmt.test.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend/src/shell/AppShell.session-mgmt.test.tsx b/frontend/src/shell/AppShell.session-mgmt.test.tsx index 81f3a8f6..224fb0b7 100644 --- a/frontend/src/shell/AppShell.session-mgmt.test.tsx +++ b/frontend/src/shell/AppShell.session-mgmt.test.tsx @@ -1,10 +1,11 @@ -import { render, screen, waitFor, within } from "@testing-library/react"; +import { act, render, screen, waitFor, within } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; import { http, HttpResponse } from "msw"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { server } from "../test/msw"; import { FakeEventSource } from "../test/fakeEventSource"; import { AppShell } from "./AppShell"; +import { useSessionStore } from "../store/sessionStore"; function wrap() { const client = new QueryClient({ defaultOptions: { queries: { retry: false } } }); @@ -78,9 +79,6 @@ test("a failed resume keeps the panel open and does not activate the session", a await waitFor(() => expect(screen.getByText("Domanda originale")).toBeInTheDocument()); }); -import { act } from "@testing-library/react"; -import { useSessionStore } from "../store/sessionStore"; - test("WIP icon toggles the Model activity panel and shows the streamed text", async () => { wrap(); // Activate a session by opening + resuming is heavy; instead drive the store directly.