Fix API parameter nesting and add input/output validation to e2e tests#27
Merged
Fix API parameter nesting and add input/output validation to e2e tests#27
Conversation
The CLI was sending request parameters at the top level, but the Rails
API expects them nested under resource-specific keys (e.g., card: {...},
board: {...}). This caused data to silently not be saved.
Fixed parameter nesting in:
- card.go: nest under card: {...}
- board.go: nest under board: {...}
- column.go: nest under column: {...}
- step.go: nest under step: {...}
Enhanced e2e tests to verify input == output:
- Board: verify name after create
- Card: verify title, description (plain text + HTML)
- Column: verify name and color after create
- Comment: verify body (plain text + HTML) on create and update
The e2e tests didn't catch this before because they skip without
FIZZY_TEST_TOKEN, and CI doesn't have API credentials configured.
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
Problem
The CLI was sending request parameters at the top level:
{ "board_id": "...", "title": "...", "description": "..." }But the Rails API expects them nested under a resource key:
{ "board_id": "...", "card": { "title": "...", "description": "..." } }This caused data to silently not be saved because Rails'
params.expect(card: [...])couldn't find the nested parameters.Changes
Fixed parameter nesting in:
card.go: nest undercard: {...}board.go: nest underboard: {...}column.go: nest undercolumn: {...}step.go: nest understep: {...}Enhanced e2e tests to verify input == output:
Why e2e tests didn't catch this before
FIZZY_TEST_TOKENis not setTest plan