Skip to content

Tests: expand Compose screen test coverage #64

Description

@patrickrb

Follow-up from #27 / PR #58.

PR #58 added FilterChipsScreenTest as the template for screen-level
testing — it runs under Robolectric + createComposeRule() on the JVM,
so no emulator is needed. The remaining major screens are uncovered.

Screens to cover

  • WaterfallScreen — spectrum render + frequency picker interactions
  • DecodeScreen — decoded-message list, filter chips wired to
    DecodedRow, weak-signal asterisk handling
  • LogbookScreen — list render, edit/delete row actions, sync chip
    state, QRZ avatar load (with the image fetch mocked or stubbed)
  • MapScreen — base render + PSK Reporter overlay toggle (mock the
    client via the baseUrl seam already in place)
  • SettingsScreen — radio model picker, control-mode toggle, QRZ
    test-connection flow

Pattern

Mirror FilterChipsScreenTest:

@RunWith(AndroidJUnit4::class)
@Config(qualifiers = "w360dp-h640dp-xhdpi")
class FooScreenTest {
    @get:Rule val composeRule = createComposeRule()

    @Test fun renders_initial_state() { ... }
    @Test fun user_interaction_updates_state() { ... }
}

Goal is render + golden-path interactions, not pixel-perfect visual
regression. One or two tests per screen is plenty for the first pass.

Why this matters

Refactors and theme changes break Compose render paths in non-obvious
ways. Screen tests catch those without needing a human to spin up the
emulator and click through.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions