mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-17 19:20:39 +09:00
comment wake batching test
This commit is contained in:
parent
ec75cabcd8
commit
8894520ed0
1 changed files with 17 additions and 0 deletions
|
|
@ -488,6 +488,23 @@ describe("heartbeat comment wake batching", () => {
|
||||||
|
|
||||||
expect(firstRun).not.toBeNull();
|
expect(firstRun).not.toBeNull();
|
||||||
await waitFor(() => gateway.getAgentPayloads().length === 1);
|
await waitFor(() => gateway.getAgentPayloads().length === 1);
|
||||||
|
const firstPayload = gateway.getAgentPayloads()[0] ?? {};
|
||||||
|
expect(firstPayload.paperclip).toMatchObject({
|
||||||
|
wake: {
|
||||||
|
reason: "issue_assigned",
|
||||||
|
issue: {
|
||||||
|
id: issueId,
|
||||||
|
identifier: `${issuePrefix}-1`,
|
||||||
|
title: "Require a comment",
|
||||||
|
status: "todo",
|
||||||
|
priority: "medium",
|
||||||
|
},
|
||||||
|
commentIds: [],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
expect(String(firstPayload.message ?? "")).toContain("## Paperclip Wake Payload");
|
||||||
|
expect(String(firstPayload.message ?? "")).toContain("Do not switch to another issue until you have handled this wake.");
|
||||||
|
expect(String(firstPayload.message ?? "")).toContain(`${issuePrefix}-1 Require a comment`);
|
||||||
gateway.releaseFirstWait();
|
gateway.releaseFirstWait();
|
||||||
await waitFor(async () => {
|
await waitFor(async () => {
|
||||||
const runs = await db
|
const runs = await db
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue