fix(frontend): restore readable model activity timeline
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user