Skip to content

Commit cdedb0b

Browse files
committed
test: cover changed review gate links
1 parent 4127453 commit cdedb0b

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

‎src/services/__tests__/pr-review-state-workflow.test.ts‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,6 +1127,27 @@ describe("PR review-state workflow", () => {
11271127
expect(result.addLabels).toHaveBeenCalledWith(expect.objectContaining({ labels: ["awaiting-coderabbit"] }))
11281128
})
11291129

1130+
it("publishes a changed review gate status with the workflow run URL", async () => {
1131+
const result = await runWorkflow({
1132+
gateStatuses: [
1133+
{
1134+
context: "Zoo Code / PR review gate",
1135+
state: "pending",
1136+
description: "Wait for the required CI checks to finish.",
1137+
targetUrl: "https://github.com/Zoo-Code-Org/Zoo-Code/pull/1437",
1138+
},
1139+
],
1140+
})
1141+
1142+
expect(latestGateStatus(result)).toEqual(
1143+
expect.objectContaining({
1144+
state: "pending",
1145+
description: "Required CI passed. Wait for CodeRabbit to approve the latest commit.",
1146+
target_url: WORKFLOW_RUN_URL,
1147+
}),
1148+
)
1149+
})
1150+
11301151
it("continues metadata reconciliation when gate publication fails", async () => {
11311152
const result = await runWorkflow({ createCommitStatusErrorStatus: 500 })
11321153

0 commit comments

Comments
 (0)