Skip to content

test: add unit tests for pickStepFromPrompt in cmd/openformresponse - #760

Open
mwbrooks wants to merge 2 commits into
mainfrom
mwbrooks-test-pick-step-from-prompt
Open

mwbrooks wants to merge 2 commits into
mainfrom
mwbrooks-test-pick-step-from-prompt

Conversation

@mwbrooks

@mwbrooks mwbrooks commented Nov 6, 2026

Copy link
Copy Markdown
Member

Changelog

N/A - adds tests only, with no user-facing changes.

Summary

This pull request adds unit tests for pickStepFromPrompt in cmd/openformresponse/export.go, which had no test coverage. It is one in a series of small coverage PRs.

  • Adds cases to TestExportCommand in cmd/openformresponse/export_test.go for running without --step-id: picking a step from the prompt (including a deleted step label), a workflow with no steps, and a failed steps list
  • Raises cmd/openformresponse coverage from 42.3% to 82.7%

Testing

  1. Run go test ./cmd/openformresponse/... -run TestExportCommand -v and confirm the cases pass

Requirements

@mwbrooks mwbrooks added this to the Next Release milestone Nov 6, 2026
@mwbrooks mwbrooks added code health M-T: Test improvements and anything that improves code health semver:patch Use on pull requests to describe the release version increment labels Nov 6, 2026
@mwbrooks mwbrooks self-assigned this Nov 6, 2026
@codecov

codecov Bot commented Nov 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.58%. Comparing base (1af3a2d) to head (32e9fec).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #760      +/-   ##
==========================================
+ Coverage   78.46%   78.58%   +0.12%     
==========================================
  Files         240      240              
  Lines       18199    18199              
==========================================
+ Hits        14280    14302      +22     
+ Misses       3919     3897      -22     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mwbrooks
mwbrooks marked this pull request as ready for review November 6, 2026 21:29
@mwbrooks
mwbrooks requested a review from a team as a code owner November 6, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code health M-T: Test improvements and anything that improves code health semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant