fix(layout): retirer les affichages Busy et Cancel de la cellule agent au lancement sur une tâche — #277 (retrait badge Busy, bouton Cancel/interruptCurrentTurn et layer z turnActions; états inbox/tâches de fond et composer busy préservés; QA verte ré-exécutée: 25/25 tests LayoutGrid cellControlsLayering/chat)
This commit is contained in:
@ -243,10 +243,10 @@ describe("LayoutGrid — ticket #48 cell control layering", () => {
|
||||
expect(screen.getByLabelText(`split ${setup.bId} columns`)).toBeTruthy();
|
||||
expect(screen.getByLabelText(`split ${setup.bId} rows`)).toBeTruthy();
|
||||
expect(screen.getByLabelText(`close ${setup.bId}`)).toBeTruthy();
|
||||
expect(screen.getByRole("button", {
|
||||
expect(screen.queryByRole("button", {
|
||||
name: `cancel current turn ${setup.bId}`,
|
||||
})).toBeTruthy();
|
||||
expect(screen.getByText("Busy")).toBeTruthy();
|
||||
})).toBeNull();
|
||||
expect(screen.queryByText("Busy")).toBeNull();
|
||||
|
||||
fireEvent.click(screen.getByLabelText(`split ${setup.bId} columns`));
|
||||
await waitFor(() =>
|
||||
@ -276,7 +276,7 @@ describe("LayoutGrid — ticket #48 cell control layering", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("keeps busy Cancel above persistent cell controls and removes History (#151, #160)", async () => {
|
||||
it("hides busy controls while keeping persistent cell controls and History removed (#277)", async () => {
|
||||
const setup = await makeSplitAgentGrid();
|
||||
await setup.layout.mutateLayout("p1", {
|
||||
type: "setCellConversation",
|
||||
@ -297,24 +297,13 @@ describe("LayoutGrid — ticket #48 cell control layering", () => {
|
||||
renderGrid(setup.gateways, { onOpenConversation: vi.fn() });
|
||||
await flush();
|
||||
|
||||
act(() => setup.system.emit(busy(setup.agentId, true)));
|
||||
|
||||
const cancel = await screen.findByRole("button", {
|
||||
expect(screen.queryByRole("button", {
|
||||
name: `cancel current turn ${setup.bId}`,
|
||||
});
|
||||
const status = screen
|
||||
.getAllByRole("status")
|
||||
.find((element) => element.textContent === "Busy") as HTMLElement;
|
||||
})).toBeNull();
|
||||
expect(screen.queryByText("Busy")).toBeNull();
|
||||
const { controls } = controlsFor(setup.bId);
|
||||
|
||||
expect(status).toBeTruthy();
|
||||
expect(cancel.style.position).toBe("absolute");
|
||||
expect(status.style.top).toBe("24px");
|
||||
expect(status.style.zIndex).toBe("3");
|
||||
expect(cancel.style.top).toBe("24px");
|
||||
expect(cancel.style.right).toBe("20px");
|
||||
expect(cancel.style.zIndex).toBe("6");
|
||||
expect(Number(cancel.style.zIndex)).toBeGreaterThan(Number(controls.style.zIndex));
|
||||
expect(controls.style.zIndex).toBe("5");
|
||||
expect(screen.queryByRole("button", {
|
||||
name: `open cell conversation ${setup.bId}`,
|
||||
})).toBeNull();
|
||||
|
||||
Reference in New Issue
Block a user