Skip to content

test(test): guard status filter validation order#222

Open
Lexiie wants to merge 1 commit into
TestSprite:mainfrom
Lexiie:fix/test-list-status-validation
Open

test(test): guard status filter validation order#222
Lexiie wants to merge 1 commit into
TestSprite:mainfrom
Lexiie:fix/test-list-status-validation

Conversation

@Lexiie

@Lexiie Lexiie commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Resubmission of test(test): guard status filter validation order #211 after the release-process hiccup closed it without merge.
  • Add a focused test list --status junk regression test that runs without credentials.
  • Pin the expected local VALIDATION_ERROR behavior so invalid status filters cannot regress into AUTH_REQUIRED if validation order changes.

Changes

  • Covers the runList command-parser path for --status validation before credentials/client setup.

Verification

  • rtk vitest run src/commands/test.test.ts -t "rejects --status=junk before reading credentials"
  • rtk npx eslint src/commands/test.test.ts --fix-dry-run --format stylish
  • rtk npx eslint src/commands/test.test.ts
  • rtk npm run typecheck

Fixes #210

Summary by CodeRabbit

  • Bug Fixes
    • Added validation so invalid --status values are rejected immediately when listing tests, with a clear validation error.
    • Prevents unnecessary follow-up actions after an invalid command is entered.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 00017205-bc47-42a5-ae9a-5a26cd48d998

📥 Commits

Reviewing files that changed from the base of the PR and between 3305dfa and 7bb9edd.

📒 Files selected for processing (1)
  • src/commands/test.test.ts

Walkthrough

Added a new test case to src/commands/test.test.ts that verifies testsprite test list --status junk rejects locally with VALIDATION_ERROR prior to reading credentials or performing network I/O, using disableExits(test) to prevent process exit.

Changes

Status validation regression test

Layer / File(s) Summary
Add runList status validation test
src/commands/test.test.ts
New test case asserts invalid --status=junk rejects locally with VALIDATION_ERROR before credentials or network access.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

Suggested reviewers: ruili-testsprite, zeshi-du

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately describes the main change: guarding status filter validation order.
Linked Issues check ✅ Passed The added regression test matches #210 by asserting invalid --status fails locally with VALIDATION_ERROR before credentials or network work.
Out of Scope Changes check ✅ Passed The changes are narrowly scoped to the requested runList validation regression test and do not introduce unrelated behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

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.

[Hackathon] guard test list status validation before auth

1 participant