Skip to content

test: add tests for cloudpicker and modal UI components#40

Merged
larkly merged 1 commit intomainfrom
test/ui-component-state-machines
Mar 27, 2026
Merged

test: add tests for cloudpicker and modal UI components#40
larkly merged 1 commit intomainfrom
test/ui-component-state-machines

Conversation

@larkly
Copy link
Copy Markdown
Owner

@larkly larkly commented Mar 27, 2026

Summary

  • Add 8 tests for cloudpicker (cursor navigation, cloud selection, empty list, quit, window resize)
  • Add 9 tests for confirm modal (constructors, y/n/esc keys, focus toggling, enter on confirm vs cancel)
  • Add 5 tests for error modal (constructor, enter/esc dismissal, unhandled key, window resize)

All tests use stdlib testing only, matching existing project conventions.

Closes #34

Test plan

  • go test -race -count=1 ./internal/ui/cloudpicker/ ./internal/ui/modal/ passes
  • Full suite go test -race ./... passes with no regressions

Add 22 tests covering the Bubble Tea state machines for cloudpicker,
confirm modal, and error modal — cursor navigation, key handling,
focus toggling, and window resize.

Closes #34
@larkly larkly merged commit a21fb7b into main Mar 27, 2026
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.

Tests: UI component state machines (cloudpicker, modal)

1 participant