fix: update plugin-integration tests for getCIChecks field name changes

The getCIChecks fix changed field names from `conclusion`/`detailsUrl`
to `state`/`link`. Updated test mocks to match:

- Changed `conclusion: "SUCCESS"` → `state: "SUCCESS"`
- Changed `conclusion: "FAILURE"` → `state: "FAILURE"`
- Changed `detailsUrl` → `link`

Tests now pass with correct field names.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Prateek 2026-02-15 03:28:26 +05:30
parent f8fc51ae9d
commit ae8cf46d64
1 changed files with 4 additions and 4 deletions

View File

@ -436,9 +436,9 @@ describe("plugin integration", () => {
// gh calls for determineStatus:
// 1. getPRState → open
mockGh({ state: "OPEN" });
// 2. getCISummary → failing (pr checks returns array of checks)
// 2. getCISummary → failing (pr checks returns array of checks with correct field names)
mockGh([
{ name: "lint", state: "COMPLETED", conclusion: "FAILURE", detailsUrl: "", startedAt: "", completedAt: "" },
{ name: "lint", state: "FAILURE", link: "", startedAt: "", completedAt: "" },
]);
await lm.check("app-1");
@ -492,9 +492,9 @@ describe("plugin integration", () => {
// 1. getPRState → open
mockGh({ state: "OPEN" });
// 2. getCISummary → passing
// 2. getCISummary → passing (using correct field names: state and link)
mockGh([
{ name: "lint", state: "COMPLETED", conclusion: "SUCCESS", detailsUrl: "", startedAt: "", completedAt: "" },
{ name: "lint", state: "SUCCESS", link: "", startedAt: "", completedAt: "" },
]);
// 3. getReviewDecision (gh pr view with reviewDecision)
mockGh({ reviewDecision: "CHANGES_REQUESTED" });