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
  • 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

  • Instrumentation or Robolectric: slot/item binding
  • Gated clicks do not fire when Block
  • Content descriptions set on icon-only entries
  • Signal unavailable / stale / fault rendering for status items
  • 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
  • Document Soong static_libs review for SystemUI sample wiring (no CabinCompose)

Later (post-MVP)

AreaExpectation
Compose System/Status barsExperimental — gate / Signal / tone parity tests in cabin-compose (shipped); screenshot/golden later
Screenshot / goldenPaparazzi (or equiv.) for Views; Compose parity screenshots
Dual-stack parityShared fixtures for System/Status bar state
CatalogThin sample tests in catalog/ (fixtures + packaging guard); visual QA later
Platform image CIOptional userdebug jobs consuming Soong modules

Gradle CI vs platform / Soong

Lanev0.1
Gradle CI (GitHub/etc.)Unit tests for compliance + tokens + Theme Kit / Views bars (cabin-views) + Experimental Compose bars (cabin-compose); lint/format as added
Platform / SoongManual or partner tree verification that Cabin* modules build and SystemUI-shaped target links thinly; full AAOS image CI is partner-owned

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