fix(milestones): align API response parsing with contract#261
Merged
steilerDev merged 3 commits intobetafrom Feb 24, 2026
Merged
fix(milestones): align API response parsing with contract#261steilerDev merged 3 commits intobetafrom
steilerDev merged 3 commits intobetafrom
Conversation
GET /api/milestones/:id, POST /api/milestones, and PATCH /api/milestones/:id
return the milestone object directly (not wrapped in { milestone: ... }).
The client was incorrectly unwrapping a non-existent wrapper property, causing
getMilestone, createMilestone, and updateMilestone to always return undefined.
listMilestones is unchanged — GET /api/milestones correctly returns { milestones: [...] }.
Fixes #23
Co-Authored-By: Claude frontend-developer (Sonnet 4.5) <noreply@anthropic.com>
…e format
Update milestonesApi unit test mocks to return milestone objects directly
instead of wrapped in { milestone: ... }. Fix E2E milestone CRUD tests to
parse page.request.post responses correctly. Fix switchToGantt() POM method
to handle empty state on mobile (prevents timeout when no work items exist).
Co-Authored-By: Claude qa-integration-tester (Sonnet 4.5) <noreply@anthropic.com>
… responses
Update createMilestone and updateMilestone mutation response mocks to return
the milestone object directly instead of wrapped in { milestone: ... }.
Co-Authored-By: Claude qa-integration-tester (Opus 4.6) <noreply@anthropic.com>
This was referenced Feb 24, 2026
|
🎉 This PR is included in version 1.10.0-beta.13 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
milestonesApi.tswherecreateMilestone,updateMilestone, andgetMilestoneincorrectly expected wrapped{ milestone: ... }responses, causing all three to returnundefinedbody.milestone.id→body.id)switchToGantt()POM method to handle empty/no-dates state on mobile (prevents timeout)Root Cause
The API contract specifies that single-resource milestone endpoints return the milestone object directly. The server implementation is correct, but
milestonesApi.tswas incorrectly doing.then(r => r.milestone)which returnedundefined. This caused:TypeError: Cannot read properties of undefined (reading 'id')Test plan
npx jest milestonesApi.test.ts)🤖 Generated with Claude Code