mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-03 03:36:57 +01:00
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:
1 parent
a1eb43146a
commit
53422d863e
1 file changed
+6
-6
@@ -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) => {
|
||||
|
||||
Reference in new issue
Block a user