fix(ui): Lot A #151 #158 #159 (QA verte)

- #151: chevauchement des boutons dans la barre supérieure pendant une conversation agent

- #158: popup de reprise de conversation intempestive (ajout cellule / changement layout / projet)

- #159: pastille d'activité de projet
This commit is contained in:
2026-08-06 10:23:23 +02:00
parent fb19ee48dc
commit c5d6c3b98e
10 changed files with 351 additions and 6 deletions

View File

@ -7,7 +7,7 @@
* read as faint text rather than a control.
*/
import { describe, it, expect, vi } from "vitest";
import { render, screen, fireEvent } from "@testing-library/react";
import { render, screen, fireEvent, within } from "@testing-library/react";
import type { TabItem } from "@/shared";
import { ProjectTabs } from "./ProjectTabs";
@ -27,6 +27,7 @@ function renderTabs(props: Partial<React.ComponentProps<typeof ProjectTabs>> = {
onClose={props.onClose ?? vi.fn()}
projectsPanelOpen={props.projectsPanelOpen ?? false}
onOpenProjectsPanel={onOpenProjectsPanel}
activityByProjectId={props.activityByProjectId}
/>,
);
return { onOpenProjectsPanel };
@ -74,3 +75,24 @@ describe("ProjectTabs add-project button (#46)", () => {
expect(onOpenProjectsPanel).toHaveBeenCalledTimes(1);
});
});
describe("ProjectTabs project activity dots (#159)", () => {
it("renders the neutral activity dot to the left of a project name by default", () => {
renderTabs({ items: TABS });
const tab = screen.getByRole("tab", { name: /alpha/ });
expect(
within(tab).getByTitle("alpha : aucune conversation active"),
).toBeTruthy();
});
it("renders idle and busy project activity states", () => {
renderTabs({
items: TABS,
activityByProjectId: { a: "idle", b: "busy" },
});
expect(screen.getByTitle("alpha : conversation ouverte")).toBeTruthy();
expect(screen.getByTitle("beta : activité en cours")).toBeTruthy();
});
});