fix(ui): stream phase progress without gates
This commit is contained in:
@@ -29,6 +29,18 @@ test("dots carry done / running / pending states around the active phase", () =>
|
||||
expect(screen.getByTestId("phase-F5")).toHaveAttribute("data-state", "pending");
|
||||
});
|
||||
|
||||
test("phase_started colors a phase even when no human gate was rendered", () => {
|
||||
const store = useSessionStore.getState();
|
||||
store.setPhase("F1");
|
||||
store.applyEvent({ type: "system_event", event: "phase_started", phase: "F2" });
|
||||
|
||||
render(<WorkflowBar />);
|
||||
|
||||
expect(screen.getByTestId("phase-F1")).toHaveAttribute("data-state", "done");
|
||||
expect(screen.getByTestId("phase-F2")).toHaveAttribute("data-state", "running");
|
||||
expect(screen.getByTestId("phase-F3")).toHaveAttribute("data-state", "pending");
|
||||
});
|
||||
|
||||
test("the active dot turns to the error state when phaseError flags it", () => {
|
||||
const st = useSessionStore.getState();
|
||||
st.applyEvent({ type: "ui_request", ui_request: { id: "u", widget: "select", phase: "F3_x" } });
|
||||
|
||||
Reference in New Issue
Block a user