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 <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-10-15 11:03:20 -05:00
1 parent a1eb43146a
commit 53422d863e
1 file changed
+6 -6
+6 -6
View File
@@ -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) => {