Skip to main content

Testing

Testing expectations for Cabin. v0.1 MVP focuses on Restriction Engine unit tests and Views chrome verification. Compose bar parity is Experimental (post-MVP) with gate / Signal / tone unit tests.

v0.1 required​

Restriction Engine (unit)​

  • Fixtures for Parked / Idling / Moving / Restricted / Unknown
  • Assert allow / substitute / block for System Bar and Status Bar categories per restriction-states.md
  • Unknown defaults documented and tested
  • No Android UI toolkit required in cabin-compliance tests

Tokens​

  • Codegen or resource packaging produces expected keys from tokens/cabin.tokens.json
  • CI drift gate: python3 tools/generate_cabin_tokens.py --check (Android + Compose + CSS)
  • Safety-lock metadata preserved for warning / error
  • Day/night scheme roles present: surface, onSurface, surfaceVariant, outline, container, onContainer, plus feedback (warning / error / charging)
  • Night contrast locked for warning / error / charging (no soft-wash)
  • Body-text roles (onSurface, onContainer) stay off domain accents

Theme Kit (Views)​

  • Robolectric (or instrumentation): Theme.Cabin resolves scheme roles day/night
  • OEM theme overlay remaps brand (primary) without changing locked warning / error / charging (theme-kit, ADR 0003)
  • No AppCompat/Material required in the Theme Kit module graph for resolution

Views System Bar / Status Bar / ClimateTile / MediaNowPlaying​

  • Instrumentation or Robolectric: slot/item binding; ClimateTile / MediaNowPlaying bind
  • Gated clicks do not fire when Block (HvacAdjust, MediaComplex, chrome)
  • Content descriptions set on icon-only entries / transport
  • Signal unavailable / stale / fault rendering for status items and domain tiles
  • Media progress omitted when position/duration Signals are not live (no fake telemetry)
  • Theme overlay / RRO smoke (manual or automated) without forking widgets (Theme Kit overlay tests cover the brand path ahead of bar widgets)

Packaging / thin deps​

  • Gradle module dependency tests (or lint) ensuring Views ⊀ Compose
  • Soong thin-deps guard: python3 tools/check_soong_thin_deps.py (no CabinCompose / CabinGauges / catalog in SystemUI-shaped sketch; no catalog bp; Views static_libs include CabinFoundation)
  • Component inventory drift: python3 tools/generate_cabin_components.py --check
  • Document Soong static_libs review against systemui-cabin sketch

Later (post-MVP)​

AreaExpectation
Compose System/Status bars + ClimateTile / MediaNowPlayingExperimental — gate / Signal / tone / honest-media parity tests in cabin-compose (shipped); screenshot/golden later
Kit scaffold familiesOne parameterized smoke per family: composition/bind, testTag, Block while Moving (cabin-compose / cabin-views / cabin-gauges); no goldens in this pass
Screenshot / goldenPaparazzi (or equiv.) for Views; Compose parity screenshots
Dual-stack parityShared fixtures for System/Status bar state
CatalogThin sample tests in catalog/ (fixtures + registry + packaging guard); visual QA later
Kitchen sinksamples/kitchen-sink — component inspector + composed screens; packaging guard
Platform image CIOptional userdebug jobs consuming Soong modules

Gradle CI vs platform / Soong​

Lanev0.1
Gradle CI (GitHub/etc.)Unit tests for tokens + compliance + foundation + Views + Compose + gauges + catalog + kitchen-sink; tools/check_soong_thin_deps.py; token and component codegen --check
Platform / SoongManual or partner tree verification that Cabin* modules build and SystemUI-shaped target links thinly (sketch); full AAOS image CI is partner-owned

Cabin does not require hosting a full AAOS tree in this repo for MVP.