Skip to content

Add CLI search --needs-producer-review parsing tests#1556

Merged
SorraTheOrc merged 4 commits intomainfrom
feature/WL-0MM2FAK151BCC3H5-needs-producer-review-tests
Apr 20, 2026
Merged

Add CLI search --needs-producer-review parsing tests#1556
SorraTheOrc merged 4 commits intomainfrom
feature/WL-0MM2FAK151BCC3H5-needs-producer-review-tests

Conversation

@SorraTheOrc
Copy link
Copy Markdown
Member

Summary

This PR adds comprehensive CLI tests for the wl search --needs-producer-review flag to verify boolean parsing and default semantics.

Work Item

  • WL-0MM2FAK151BCC3H5 - Add CLI needsProducerReview parsing tests

Changes

Tests Added (tests/cli/issue-status.test.ts)

Added 6 new test cases in a new describe('search --needs-producer-review parsing') block:

  1. --needs-producer-review true - Verifies filtering returns only items with needsProducerReview: true
  2. --needs-producer-review (no value) - Verifies default behavior treats omitted value as true
  3. --needs-producer-review false - Verifies filtering returns only items with needsProducerReview: false
  4. --needs-producer-review yes - Verifies human-friendly yes token behaves same as true
  5. --needs-producer-review no - Verifies human-friendly no token behaves same as false
  6. Invalid value handling - Verifies invalid values (e.g., maybe) are rejected with appropriate error

Test Approach

  • Tests create items via CLI to ensure they exist in the SQLite database (required for search)
  • Tests use --json output for deterministic assertions
  • Tests verify correct item IDs are returned for each filter value

Acceptance Criteria Met

  • Tests exist under tests/cli/ that verify --needs-producer-review true returns only items with needsProducerReview: true
  • Tests verify --needs-producer-review false returns only items with needsProducerReview: false
  • Tests verify yes/ no behave the same as true/false
  • Tests verify omitted value defaults to true
  • Tests verify invalid values are rejected
  • Full project test suite passes (1474 tests)
  • No production code changes (tests-only scope)

Related Work

  • Parent: WL-0MLZVRB3501I5NSU - Add search filter test coverage
  • Related: WL-0MNU8PN8J0046K9Q, WL-0MNU8PNNJ005U23Q - API-level test failures (referenced in work item)

Review Focus

  • Test coverage completeness for all boolean parsing variants
  • Test structure follows existing patterns in tests/cli/issue-status.test.ts
  • No production code changes required

Sorra added 4 commits April 19, 2026 16:10
…s, and add CLI needs-producer-review yes/no parsing tests
…C3H5)

- Add 6 test cases for search command --needs-producer-review flag
- Tests cover true/false/yes/no values, default behavior, and invalid input
- Tests verify filtering works correctly with SQLite-backed search
@SorraTheOrc
Copy link
Copy Markdown
Member Author

All CI checks are passing

This PR is ready for review.

Posted automatically by AMPA PR Monitor.

@SorraTheOrc SorraTheOrc merged commit 13c775e into main Apr 20, 2026
4 checks passed
@SorraTheOrc SorraTheOrc deleted the feature/WL-0MM2FAK151BCC3H5-needs-producer-review-tests branch April 28, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant