mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-21 00:05:49 +02:00
test(ui): assert reasoning precedes saved reply on first reveal
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
8355e22b9b
commit
5cc651464c
1 file changed
+18
-3
@@ -437,7 +437,15 @@ describe.each(["legacy", "native"] as const)("%s task history readiness", (runti
|
||||
async (status) => {
|
||||
const props = {
|
||||
issueId: "issue-1",
|
||||
comments: createLongThreadComments(),
|
||||
comments: [...createLongThreadComments(), {
|
||||
...createLongThreadComments()[3],
|
||||
id: "agent-answer",
|
||||
authorType: "agent" as const,
|
||||
authorAgentId: "agent-1",
|
||||
body: "Final saved reply",
|
||||
runId: "started-run",
|
||||
createdAt: new Date("2026-08-25T18:00:02.000Z"),
|
||||
}],
|
||||
onAdd: async () => {},
|
||||
linkedRuns: [
|
||||
retryRun,
|
||||
@@ -459,11 +467,11 @@ describe.each(["legacy", "native"] as const)("%s task history readiness", (runti
|
||||
transcriptState.hydratedRunIds = new Set(["started-run"]);
|
||||
nativeTranscriptState.hydratedRunIds = new Set(["started-run"]);
|
||||
transcriptState.transcriptByRun.set("started-run", [{
|
||||
kind: "assistant", text: "Reasoning before the reply", channel: "analysis",
|
||||
kind: "thinking", text: "Reasoning before the reply",
|
||||
ts: "2026-08-25T18:00:01.000Z",
|
||||
}]);
|
||||
nativeTranscriptState.transcriptByRun.set("started-run", [{
|
||||
kind: "assistant", text: "Reasoning before the reply", channel: "analysis",
|
||||
kind: "assistant", text: "Reasoning before the reply", channel: "progress",
|
||||
ts: "2026-08-25T18:00:01.000Z",
|
||||
}]);
|
||||
render(<TaskChatThread {...props} />);
|
||||
@@ -477,6 +485,13 @@ describe.each(["legacy", "native"] as const)("%s task history readiness", (runti
|
||||
).toBeNull();
|
||||
expect(container.querySelector('[data-thread-anchor="comment-1"]')?.closest('[inert]')).toBeNull();
|
||||
expect(container.textContent).toContain("Thread message 1");
|
||||
if (status === "succeeded" && runtimeMode === "native") {
|
||||
expect(container.textContent).toContain("Reasoning before the reply");
|
||||
expect(container.textContent).toContain("Final saved reply");
|
||||
expect(container.textContent!.indexOf("Reasoning before the reply")).toBeLessThan(
|
||||
container.textContent!.indexOf("Final saved reply"),
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user