Skip to content

test: add Compose UI tests for 10 screen areas#77

Merged
chrisuthe merged 4 commits intomainfrom
ui-compose-tests
Mar 8, 2026
Merged

test: add Compose UI tests for 10 screen areas#77
chrisuthe merged 4 commits intomainfrom
ui-compose-tests

Conversation

@chrisuthe
Copy link
Copy Markdown
Owner

Summary

  • Add Robolectric + Compose UI test dependencies to build.gradle.kts
  • Enable isIncludeAndroidResources for Robolectric support
  • Add 10 test files covering key Compose UI components:
  1. NowPlayingMetadataTest -- title, artist, timestamps render in MiniPlayer
  2. ServerListEmptyStateTest -- welcome hero card when no servers exist
  3. MiniPlayerVisibilityTest -- track info display and "Not Playing" state
  4. ReconnectingBannerTest -- attempt count and buffer seconds display
  5. VolumeSliderTest -- 0-1 range rendering, disabled state, state updates
  6. QueueSheetSwipeTest -- SwipeToDismissBox callback pattern, queue state model
  7. AddServerWizardTest -- step navigation renders correct titles/buttons
  8. SearchScreenResultsTest -- results grouping by type, empty/no-results logic
  9. FormFactorDetectionTest -- correct form factor for different screen sizes
  10. NowPlayingHeadUnitTest -- head unit renders large art, controls, group label

Test plan

  • Run ./gradlew testDebugUnitTest to verify all tests compile and pass
  • Verify no existing tests are broken by the new dependencies
  • Check that Robolectric SDK 34 resolves correctly on CI

…i player

Add Robolectric + Compose UI test dependencies. Add three test files:
- NowPlayingMetadataTest: verify title, artist, timestamps render in MiniPlayer
- ServerListEmptyStateTest: verify welcome hero card when no servers exist
- MiniPlayerVisibilityTest: verify track info display and "Not Playing" state
…eue items

- ReconnectingBannerTest: verify attempt count and buffer seconds display
- VolumeSliderTest: verify 0-1 range rendering and state updates
- QueueSheetSwipeTest: verify swipe-to-dismiss callback pattern and queue state
- AddServerWizardTest: verify step navigation renders correct titles,
  buttons (Next/Save/Back), and forward/backward transitions
- SearchScreenResultsTest: verify search results grouping by media type,
  empty/no-results state logic, and media type discriminators
…yout

- FormFactorDetectionTest: verify correct form factor for compact, medium,
  expanded widths and TV override behavior at boundary values
- NowPlayingHeadUnitTest: verify head unit renders title, artist/album,
  transport controls, group label, and favorite button
@chrisuthe chrisuthe merged commit a068f4b into main Mar 8, 2026
@chrisuthe chrisuthe deleted the ui-compose-tests branch March 8, 2026 03:11
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.

1 participant