fix(frontend): refine activity layout and input state
This commit is contained in:
@@ -41,6 +41,8 @@ test("New session starts prewarm without delaying composer focus", async () => {
|
||||
const composer = screen.getByRole("textbox", { name: /new question/i });
|
||||
await waitFor(() => expect(prewarmStarted).toBe(true));
|
||||
await waitFor(() => expect(composer).toHaveFocus());
|
||||
expect(composer).toHaveAttribute("data-awaiting-input", "true");
|
||||
expect(composer).toHaveClass("thot-awaiting-input");
|
||||
});
|
||||
|
||||
test("shows the question and creation timer before POST /sessions resolves, then opens SSE", async () => {
|
||||
@@ -87,3 +89,12 @@ test("a failed create restores the landing view and preserves the question for r
|
||||
expect(useSessionStore.getState().lastUserEntry).toBeNull();
|
||||
expect(FakeEventSource.instances).toHaveLength(0);
|
||||
});
|
||||
|
||||
|
||||
test("marks the composer as awaiting input for a pending freetext gate", () => {
|
||||
useSessionStore.setState({
|
||||
pendingWidget: { id: "free-1", widget: "freetext", title: "Clarify" },
|
||||
});
|
||||
renderShell();
|
||||
expect(screen.getByRole("textbox", { name: /new question/i })).toHaveAttribute("data-awaiting-input", "true");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user