fix(frontend): restore readable model activity timeline

This commit is contained in:
User
2026-07-15 14:55:57 +02:00
parent 9274f07987
commit 30e76a968d
3 changed files with 48 additions and 112 deletions
@@ -711,11 +711,12 @@ test("closing and reopening Model activity preserves the complete activity log",
await userEvent.click(screen.getByRole("button", { name: /model activity/i }));
const panel = (await screen.findByRole("heading", { name: /model activity/i })).closest("aside");
expect(panel).not.toBeNull();
expect(panel).toHaveTextContent("Inspect patient cohort");
expect(panel).toHaveTextContent("Inspecting cohort");
expect(within(panel!).getByText("cohort").tagName).toBe("STRONG");
expect(within(panel!).getByText("Cohort status")).toBeInTheDocument();
expect(within(panel!).queryByText("Inspect patient cohort")).not.toBeInTheDocument();
expect(within(panel!).getByText("Cohort ready")).toBeInTheDocument();
expect(within(panel!).queryByText("Cohort status")).not.toBeInTheDocument();
expect(within(panel!).queryByText("bash")).not.toBeInTheDocument();
expect(within(panel!).queryByText("Cohort ready")).not.toBeInTheDocument();
await userEvent.click(screen.getByRole("button", { name: /close model activity/i }));
expect(screen.queryByRole("heading", { name: /model activity/i })).not.toBeInTheDocument();
@@ -724,11 +725,12 @@ test("closing and reopening Model activity preserves the complete activity log",
await userEvent.click(screen.getByRole("button", { name: /show model activity/i }));
const reopened = (await screen.findByRole("heading", { name: /model activity/i })).closest("aside");
expect(reopened).not.toBeNull();
expect(reopened).toHaveTextContent("Inspect patient cohort");
expect(reopened).toHaveTextContent("Inspecting cohort");
expect(within(reopened!).getByText("cohort").tagName).toBe("STRONG");
expect(within(reopened!).getByText("Cohort status")).toBeInTheDocument();
expect(within(reopened!).queryByText("Inspect patient cohort")).not.toBeInTheDocument();
expect(within(reopened!).getByText("Cohort ready")).toBeInTheDocument();
expect(within(reopened!).queryByText("Cohort status")).not.toBeInTheDocument();
expect(within(reopened!).queryByText("bash")).not.toBeInTheDocument();
expect(within(reopened!).queryByText("Cohort ready")).not.toBeInTheDocument();
expect(useSessionStore.getState().activityLog).toEqual(beforeClose);
});