test(webui): await rendered canonical reconciliation
This commit is contained in:
1 parent
f57018aa7f
commit
8778c69774
1 file changed
+13
-11
@@ -3290,20 +3290,22 @@ describe("ThreadShell", () => {
|
|||||||
|
|
||||||
act(() => client._emitSessionUpdate("layout-recheck", "thread"));
|
act(() => client._emitSessionUpdate("layout-recheck", "thread"));
|
||||||
|
|
||||||
await waitFor(() => expect(historyCalls).toBe(2));
|
await waitFor(() => {
|
||||||
await waitFor(() =>
|
expect(historyCalls).toBe(2);
|
||||||
expect(client.reconcileCanonicalCompletion).toHaveBeenCalledTimes(1),
|
expect(client.reconcileCanonicalCompletion).toHaveBeenCalledTimes(1);
|
||||||
);
|
expect(screen.queryByText("layout partial")).not.toBeInTheDocument();
|
||||||
expect(screen.queryByText("layout partial")).not.toBeInTheDocument();
|
expect(screen.getByText("layout canonical answer")).toBeInTheDocument();
|
||||||
expect(screen.getByText("layout canonical answer")).toBeInTheDocument();
|
expect(screen.getByRole("button", { name: "Stop response" })).toBeInTheDocument();
|
||||||
expect(screen.getByRole("button", { name: "Stop response" })).toBeInTheDocument();
|
});
|
||||||
|
|
||||||
act(() => client._emitSessionUpdate("layout-recheck", "thread"));
|
act(() => client._emitSessionUpdate("layout-recheck", "thread"));
|
||||||
|
|
||||||
await waitFor(() => expect(historyCalls).toBe(3));
|
await waitFor(() => {
|
||||||
await waitFor(() => expect(screen.getByText("layout canonical answer")).toBeInTheDocument());
|
expect(historyCalls).toBe(3);
|
||||||
expect(screen.queryByText("layout partial")).not.toBeInTheDocument();
|
expect(screen.getByText("layout canonical answer")).toBeInTheDocument();
|
||||||
expect(client.reconcileCanonicalCompletion).toHaveBeenCalledTimes(2);
|
expect(screen.queryByText("layout partial")).not.toBeInTheDocument();
|
||||||
|
expect(client.reconcileCanonicalCompletion).toHaveBeenCalledTimes(2);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it("adopts a completed equal-length history when returning after an inactive outage", async () => {
|
it("adopts a completed equal-length history when returning after an inactive outage", async () => {
|
||||||
|
|||||||
Reference in new issue
Block a user