Skip to content

tests(charm): adds tests to charm experiment#355

Merged
srtaalej merged 8 commits intomainfrom
charm-tests
Feb 27, 2026
Merged

tests(charm): adds tests to charm experiment#355
srtaalej merged 8 commits intomainfrom
charm-tests

Conversation

@srtaalej
Copy link
Contributor

Changelog

Added unit tests for charm prompt implementations and Slack brand theme 🦋

Summary

This PR adds unit tests for all 5 charm/huh prompt types (input, confirm, select, password, multi-select) and the Slack brand theme. It refactors charm prompt functions to extract buildXxxForm builders, separating form construction from execution to enable programmatic testing via huh's Update/View API

Requirements

@srtaalej srtaalej added this to the Next Release milestone Feb 26, 2026
@srtaalej srtaalej self-assigned this Feb 26, 2026
@srtaalej srtaalej added enhancement M-T: A feature request for new functionality experiment Experimental feature accessed behind the --experiment flag or toggle semver:minor Use on pull requests to describe the release version increment build M-T: Changes to compilation and CI processes labels Feb 26, 2026
@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

❌ Patch coverage is 56.66667% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.97%. Comparing base (dbedcf2) to head (97cd530).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
internal/iostreams/charm.go 56.66% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #355      +/-   ##
==========================================
+ Coverage   64.43%   64.97%   +0.54%     
==========================================
  Files         214      214              
  Lines       18108    18118      +10     
==========================================
+ Hits        11667    11773     +106     
+ Misses       5348     5250      -98     
- Partials     1093     1095       +2     

☔ View full report in Codecov by Sentry.
📢 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.

@srtaalej srtaalej marked this pull request as ready for review February 27, 2026 19:01
@srtaalej srtaalej requested a review from a team as a code owner February 27, 2026 19:01
@srtaalej srtaalej requested a review from zimeg February 27, 2026 19:51
Copy link
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srtaalej LGTM! This is amazing 🧪 ✨

Thank you sincere for bringing these patterns to the CLI - it's a huge improvement on our previous testing of prompts: IIRC we just covered the flag cases... 🏁

// limitations under the License.

package iostreams
package style
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⭐ praise: Thanks so much for keeping the formats to our outputs together here!

@srtaalej srtaalej merged commit 33287a3 into main Feb 27, 2026
8 checks passed
@srtaalej srtaalej deleted the charm-tests branch February 27, 2026 20:38
@zimeg zimeg 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 and removed enhancement M-T: A feature request for new functionality semver:minor Use on pull requests to describe the release version increment build M-T: Changes to compilation and CI processes labels Feb 27, 2026
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 experiment Experimental feature accessed behind the --experiment flag or toggle 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.

2 participants