mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-24 18:22:38 +00:00
test(app): match the turn collapse reply by its last streamed chunk
Back-to-back text chunks from the mock stream merge into one message depending on delivery timing, so the final reply and the folded message count vary run to run.
This commit is contained in:
@@ -46,9 +46,11 @@ test.describe("Turn collapse", () => {
|
||||
await expectComposerVisible(page);
|
||||
|
||||
const summary = page.getByTestId("turn-summary").last().getByRole("button");
|
||||
await expect(summary).toHaveText(/^Wrote \d+ messages, edited 1 file/);
|
||||
await expect(summary).toHaveText(/^Wrote \d+ messages?, edited 1 file/);
|
||||
// Text chunks that stream back to back merge into one message, so the reply holds
|
||||
// at least the stream's last chunk.
|
||||
await expect(page.getByTestId("assistant-message").last()).toHaveText(
|
||||
"(end of synthetic stream)",
|
||||
/\(end of synthetic stream\)$/,
|
||||
);
|
||||
await expect.poll(() => rowsBetweenLatestSummaryAndReply(page)).toBe(0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user