merge develop into feature/85-fix-flaky-setcellagent-test
This commit is contained in:
7
.gitignore
vendored
7
.gitignore
vendored
@ -45,12 +45,19 @@ frontend/coverage/
|
|||||||
# Runtime file-protocol orchestration requests/responses — transient I/O, not
|
# Runtime file-protocol orchestration requests/responses — transient I/O, not
|
||||||
# durable project state (curation .ideai §chantier secondaire).
|
# durable project state (curation .ideai §chantier secondaire).
|
||||||
.ideai/requests/
|
.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):
|
# 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/).
|
# rebuilt at runtime, keyed last-writer-wins — not versioned (unlike .ideai/memory/).
|
||||||
.ideai/live-state.json
|
.ideai/live-state.json
|
||||||
# UI layout runtime state (active layout id + session ids) — machine-local,
|
# 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).
|
# rebuilt at runtime, last-writer-wins — not versioned (same class as live-state.json).
|
||||||
/.ideai/layouts.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 ───────────────────────────────────────────────────────────
|
# ─── Editors / OS ───────────────────────────────────────────────────────────
|
||||||
.idea/
|
.idea/
|
||||||
|
|||||||
@ -33,6 +33,10 @@ function renderGrid(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function waitForAgentOption(name = "MyAgent") {
|
||||||
|
await screen.findByRole("option", { name });
|
||||||
|
}
|
||||||
|
|
||||||
describe("setCellAgent (agent dropdown per cell)", () => {
|
describe("setCellAgent (agent dropdown per cell)", () => {
|
||||||
it("renders an agent selector on each leaf cell", async () => {
|
it("renders an agent selector on each leaf cell", async () => {
|
||||||
const layout = new MockLayoutGateway();
|
const layout = new MockLayoutGateway();
|
||||||
@ -59,6 +63,7 @@ describe("setCellAgent (agent dropdown per cell)", () => {
|
|||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(screen.getByRole("combobox")).toBeTruthy();
|
expect(screen.getByRole("combobox")).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
await waitForAgentOption();
|
||||||
|
|
||||||
const select = screen.getByRole("combobox") as HTMLSelectElement;
|
const select = screen.getByRole("combobox") as HTMLSelectElement;
|
||||||
fireEvent.change(select, { target: { value: a.id } });
|
fireEvent.change(select, { target: { value: a.id } });
|
||||||
@ -72,6 +77,7 @@ describe("setCellAgent (agent dropdown per cell)", () => {
|
|||||||
const leaf = leaves(tree)[0];
|
const leaf = leaves(tree)[0];
|
||||||
// The mutation should have persisted.
|
// The mutation should have persisted.
|
||||||
expect(leaf.id).toBe(leafId);
|
expect(leaf.id).toBe(leafId);
|
||||||
|
expect(leaf.agent).toBe(a.id);
|
||||||
// Since mutateLayout is async, give it a tick.
|
// Since mutateLayout is async, give it a tick.
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -151,6 +157,7 @@ describe("setCellAgent (agent dropdown per cell)", () => {
|
|||||||
|
|
||||||
renderGrid(layout, agent);
|
renderGrid(layout, agent);
|
||||||
await waitFor(() => expect(screen.getByRole("combobox")).toBeTruthy());
|
await waitFor(() => expect(screen.getByRole("combobox")).toBeTruthy());
|
||||||
|
await waitForAgentOption();
|
||||||
|
|
||||||
fireEvent.change(screen.getByRole("combobox"), { target: { value: a.id } });
|
fireEvent.change(screen.getByRole("combobox"), { target: { value: a.id } });
|
||||||
|
|
||||||
@ -180,6 +187,7 @@ describe("setCellAgent (agent dropdown per cell)", () => {
|
|||||||
|
|
||||||
renderGrid(layout, agent, "p1", terminal);
|
renderGrid(layout, agent, "p1", terminal);
|
||||||
await waitFor(() => expect(screen.getByRole("combobox")).toBeTruthy());
|
await waitFor(() => expect(screen.getByRole("combobox")).toBeTruthy());
|
||||||
|
await waitForAgentOption();
|
||||||
|
|
||||||
fireEvent.change(screen.getByRole("combobox"), { target: { value: a.id } });
|
fireEvent.change(screen.getByRole("combobox"), { target: { value: a.id } });
|
||||||
|
|
||||||
@ -197,6 +205,7 @@ describe("setCellAgent (agent dropdown per cell)", () => {
|
|||||||
|
|
||||||
renderGrid(layout, agent, "p1", terminal);
|
renderGrid(layout, agent, "p1", terminal);
|
||||||
await waitFor(() => expect(screen.getByRole("combobox")).toBeTruthy());
|
await waitFor(() => expect(screen.getByRole("combobox")).toBeTruthy());
|
||||||
|
await waitForAgentOption();
|
||||||
|
|
||||||
fireEvent.change(screen.getByRole("combobox"), { target: { value: a.id } });
|
fireEvent.change(screen.getByRole("combobox"), { target: { value: a.id } });
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user