From 53422d863e88ec142e6c3aade245ea1f150a8941 Mon Sep 17 00:00:00 2001 From: Dotta Date: Thu, 15 Oct 2026 11:03:20 -0500 Subject: [PATCH] test: await queued comment publication in Stop acceptance Comment creation returns before its asynchronous wake publishes the queue entry. Wait for that durable state before exercising Stop, using the existing assertion and deadline. Co-Authored-By: Paperclip --- tests/e2e/composer-stop.spec.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/e2e/composer-stop.spec.ts b/tests/e2e/composer-stop.spec.ts index 46cc882fe14..a9c747f9bf5 100644 --- a/tests/e2e/composer-stop.spec.ts +++ b/tests/e2e/composer-stop.spec.ts @@ -278,12 +278,12 @@ for (const adapter of ["process", "paperclip_runner"] as const) { await request.get(`/api/issues/${parent.id}/comments`), ); expect(JSON.stringify(comments)).toContain("Please check mobile too."); - const queue = await json( - await request.get(`/api/issues/${parent.id}/queued-comments`), - ); - expect(JSON.stringify(queue.entries)).toContain( - "Please check mobile too.", - ); + await expect.poll(async () => { + const queue = await json( + await request.get(`/api/issues/${parent.id}/queued-comments`), + ); + return JSON.stringify(queue.entries); + }).toContain("Please check mobile too."); let dispatchedAt = 0; page.on("request", (req) => {