feat(frontend): Active/Archive as independent accordions (replaces toggle)

This commit is contained in:
2026-06-29 21:26:52 +02:00
parent a868fc0673
commit 5442a07ced
2 changed files with 30 additions and 10 deletions
@@ -41,10 +41,15 @@ test("opening the panel shows the session documents", async () => {
expect(await screen.findByText("Domanda originale")).toBeInTheDocument();
});
test("Archive toggle reveals archived sessions", async () => {
test("Archive accordion expands to reveal archived sessions", async () => {
wrap();
await userEvent.click(await screen.findByRole("button", { name: /archive/i }));
// archived hidden until the Archive accordion is expanded
expect(await screen.findByText("Attiva uno")).toBeInTheDocument();
expect(screen.queryByText("Archiviata due")).not.toBeInTheDocument();
await userEvent.click(screen.getByRole("button", { name: /archive/i }));
expect(await screen.findByText("Archiviata due")).toBeInTheDocument();
// Active sessions remain visible (it is a separate accordion, not a swap)
expect(screen.getByText("Attiva uno")).toBeInTheDocument();
});
test("Resume from the panel activates the session and closes the panel", async () => {