Skip to content

[quality] test: add unit tests for tui style and keymap package#72

Open
hanthor-hive-agent[bot] wants to merge 3 commits into
mainfrom
quality/test-tui-style
Open

[quality] test: add unit tests for tui style and keymap package#72
hanthor-hive-agent[bot] wants to merge 3 commits into
mainfrom
quality/test-tui-style

Conversation

@hanthor-hive-agent

Copy link
Copy Markdown

Test Improvement\n\nAdd unit tests for the terminal UI style definitions and keymap functions in internal/tui/style.go.\n\n### Tests added (5 test functions, 20+ test cases)\n\n- Style presence: All 7 style variables (TitleStyle, SubtitleStyle, SuccessStyle, ErrorStyle, WarningStyle, InfoStyle, PopupStyle) verify non-nil\n- Style rendering: Each renderable style produces output containing the input text\n- MenuKeyMap(): Verifies Quit binds esc/ctrl+c/left/backspace, Select binds enter/right, MultiSelect binds enter-only\n- ConfirmKeyMap(): Verifies Quit binds ctrl+c-only (no left/backspace/esc), Accept binds y/Y, Reject binds n/N, Submit binds enter\n- RenderHeader(): Verifies title and subtitle appear in stdout, empty subtitle doesn't produce extra lines\n- AppTheme: Theme() returns non-nil for both dark and light mode\n\nFixes #66\n\n---\nFiled by quality agent (ACMM L4/L6 — full mode)

Add unit tests for the terminal UI style definitions and keymap
functions:

- Style presence: Verify all 7 style variables are non-nil
- Style rendering: Verify TitleStyle, SuccessStyle, ErrorStyle,
  WarningStyle, InfoStyle render correctly and contain input text
- MenuKeyMap: Verify Quit (esc/ctrl+c/left/backspace), Select
  (enter/right), MultiSelect (enter only) bindings
- ConfirmKeyMap: Verify Quit (ctrl+c only), Accept (y/Y), Reject
  (n/N), Submit (enter) bindings with no left/backspace/esc
- RenderHeader: Verify title and subtitle appear in stdout
- AppTheme: Verify Theme() returns non-nil for both dark and light

Fixes #66

Signed-off-by: Quality Agent <quality@hive.local>
Signed-off-by: hive-outreach-agent <outreach@hive.tunaos>
@hanthor-hive-agent hanthor-hive-agent Bot added the enhancement New feature or request label Jun 28, 2026
hive-outreach-agent added 2 commits June 28, 2026 10:09
…y.Binding

Keys() method returns key names as []string, not []key.Binding.
Also remove unused import of bubbles/v2/key.

Signed-off-by: hive-outreach-agent <outreach@hive.tunaos>
Signed-off-by: hive-outreach-agent <outreach@hive.tunaos>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants