Skip to content

Run instrumented tests on a google system image, so tests can touch Maps #63

Description

@parawanderer

The managed device in app/build.gradle.kts uses aosp-atd, which has no Play Services. Nothing needed Maps when that was chosen; two things do now.

What it unblocks

  • MapsActivity under Espresso. It is the only screen that cannot be driven at all, so its share of Make the MapsActivity pipelines testable: extract a coordinator #50 stays open. Specifically untested: the one-time local-Anisette upgrade prompt's call site, where the settings must be saved before the sign-out — the other order looks identical until the write loses a race with the activity finishing, and the user lands back on the server they just left.
  • The theme-change refetch, end to end. Changing theme, language or map provider makes AppCompat relaunch every activity, which used to make the map re-fetch every tag's history from Apple. That is fixed and covered by JVM tests on RefreshPolicy, but nothing drives a real recreation through MapsActivity to prove the wiring.

The change

create("testEmulator") {
    device = "Pixel 6"
    apiLevel = 34
    systemImageSource = "google"   // was "aosp-atd"
}

Worth measuring rather than assuming: the image is larger, so CI provisioning time and runner disk both go up. The instrumented job currently takes ~5 minutes. If the cost is bad, a second managed device for Maps-only tests keeps the fast one for everything else.

Also update the note in AGENTS.md and CONTRIBUTING.md saying aosp-atd has no Play Services and that nothing needs Maps — it stops being true.

Deliberately not part of #62, which should stay a signal about the Anisette work.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    @appIssues regarding the OpenTagViewer Android appenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions