Skip to content

Commit e1a29c0

Browse files
author
zoomote[bot]
committed
test: cover changed review gate links
1 parent 1b14b68 commit e1a29c0

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
@@ -1963,6 +1963,27 @@ describe("PR review-state workflow", () => {
19631963
expect(result.addLabels).toHaveBeenCalledWith(expect.objectContaining({ labels: ["awaiting-coderabbit"] }))
19641964
})
19651965

1966+
it("publishes a changed review gate status with the workflow run URL", async () => {
1967+
const result = await runWorkflow({
1968+
gateStatuses: [
1969+
{
1970+
context: "Zoo Code / PR review gate",
1971+
state: "pending",
1972+
description: "Wait for the required CI checks to finish.",
1973+
targetUrl: "https://github.com/Zoo-Code-Org/Zoo-Code/pull/1437",
1974+
},
1975+
],
1976+
})
1977+
1978+
expect(latestGateStatus(result)).toEqual(
1979+
expect.objectContaining({
1980+
state: "pending",
1981+
description: "Required CI passed. Waiting for automated review of the latest commit.",
1982+
target_url: WORKFLOW_RUN_URL,
1983+
}),
1984+
)
1985+
})
1986+
19661987
it("continues metadata reconciliation when gate publication fails", async () => {
19671988
const result = await runWorkflow({ createCommitStatusErrorStatus: 500 })
19681989

0 commit comments

Comments
 (0)