From 78f7c8fe2d510a1eb342e06de8e8b70aa8e20c3f Mon Sep 17 00:00:00 2001 From: Blomios Date: Mon, 27 Jul 2026 17:24:40 +0200 Subject: [PATCH] merge develop into feature/85-fix-flaky-setcellagent-test --- .gitignore | 7 +++++++ frontend/src/features/layout/setCellAgent.test.tsx | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/.gitignore b/.gitignore index 98ba25e..37ac48d 100644 --- a/.gitignore +++ b/.gitignore @@ -45,12 +45,19 @@ frontend/coverage/ # Runtime file-protocol orchestration requests/responses — transient I/O, not # durable project state (curation .ideai §chantier secondaire). .ideai/requests/ +# Ticket store IdeA: l'utilisateur veut conserver l'état local des tickets en +# dehors des branches Git. À ignorer, sinon les changements de branche peuvent +# écraser/supprimer cet état local. +.ideai/tickets/ # Volatile agent live-state snapshot ("who is doing what right now", lot LS2): # rebuilt at runtime, keyed last-writer-wins — not versioned (unlike .ideai/memory/). .ideai/live-state.json # UI layout runtime state (active layout id + session ids) — machine-local, # rebuilt at runtime, last-writer-wins — not versioned (same class as live-state.json). /.ideai/layouts.json +# Permissions MCP locales/outillage: état de runtime propre à la machine et aux +# sessions locales, pas une source de vérité projet. +.ideai/mcp-tool-permissions.json # ─── Editors / OS ─────────────────────────────────────────────────────────── .idea/ diff --git a/frontend/src/features/layout/setCellAgent.test.tsx b/frontend/src/features/layout/setCellAgent.test.tsx index c159557..82b6e10 100644 --- a/frontend/src/features/layout/setCellAgent.test.tsx +++ b/frontend/src/features/layout/setCellAgent.test.tsx @@ -33,6 +33,10 @@ function renderGrid( ); } +async function waitForAgentOption(name = "MyAgent") { + await screen.findByRole("option", { name }); +} + describe("setCellAgent (agent dropdown per cell)", () => { it("renders an agent selector on each leaf cell", async () => { const layout = new MockLayoutGateway(); @@ -59,6 +63,7 @@ describe("setCellAgent (agent dropdown per cell)", () => { await waitFor(() => { expect(screen.getByRole("combobox")).toBeTruthy(); }); + await waitForAgentOption(); const select = screen.getByRole("combobox") as HTMLSelectElement; fireEvent.change(select, { target: { value: a.id } }); @@ -72,6 +77,7 @@ describe("setCellAgent (agent dropdown per cell)", () => { const leaf = leaves(tree)[0]; // The mutation should have persisted. expect(leaf.id).toBe(leafId); + expect(leaf.agent).toBe(a.id); // Since mutateLayout is async, give it a tick. }); }); @@ -151,6 +157,7 @@ describe("setCellAgent (agent dropdown per cell)", () => { renderGrid(layout, agent); await waitFor(() => expect(screen.getByRole("combobox")).toBeTruthy()); + await waitForAgentOption(); fireEvent.change(screen.getByRole("combobox"), { target: { value: a.id } }); @@ -180,6 +187,7 @@ describe("setCellAgent (agent dropdown per cell)", () => { renderGrid(layout, agent, "p1", terminal); await waitFor(() => expect(screen.getByRole("combobox")).toBeTruthy()); + await waitForAgentOption(); fireEvent.change(screen.getByRole("combobox"), { target: { value: a.id } }); @@ -197,6 +205,7 @@ describe("setCellAgent (agent dropdown per cell)", () => { renderGrid(layout, agent, "p1", terminal); await waitFor(() => expect(screen.getByRole("combobox")).toBeTruthy()); + await waitForAgentOption(); fireEvent.change(screen.getByRole("combobox"), { target: { value: a.id } });