Android XML Views reference implementation + shared E2E matrix#286
Merged
Conversation
9c4ba8d to
0a5d220
Compare
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
…previewStateHelpers
… and in-activity preview panel for XML apps
…ng its collector only on entry
… cached AVD snapshots, and the aosp_atd image
…t and Maestro E2E
8cf9698 to
65f27b8
Compare
Charles Hudson (phobetron)
previously approved these changes
May 30, 2026
Charles Hudson (phobetron)
approved these changes
May 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a second Android reference implementation (legacy XML Views) alongside the existing Jetpack Compose one — both integrating the same SDK — and replaces the flaky UiAutomator E2E suite with a single Maestro flow set that drives both apps, mirroring the iOS SwiftUI/UIKit + shared-suite pattern.
What's in this PR
Reference implementations
:views— new XML Views app (com.contentful.optimization.app.views) mirroring every Compose screen/component, with asetTestTaghelper exposing the same kebab-case test ids.:shared— new library module hosting the platform-agnostic helpers (AppConfig,ContentfulFetcher,EventStore,MockPreviewContentfulClient,RichText) consumed by both apps.:compose— the former:appmodule, renamed.SDK (
packages/android)com.contentful.optimization.viewsadapter (OptimizationManager,OptimizedEntryView,ScreenTracker,TrackingRecyclerView) — a thin wrapper over the samecoreAPI as the Compose adapter.OptimizedEntrydropping a reset-variant re-resolution (its collector was keyed on preview-panel state instead of the entry).E2E (Maestro)
appId: ${APP_ID}, replacing the retired UiAutomator suite. The dwell/view-tracking contract stays inViewTrackingControllerTest(JVM unit) + the iOS suite.10.0.2.2emulator alias (no fragileadb reverse); flows reset viastopApp+ aresetlaunch arg (nopm clear).maestro/OFFLINE_TESTING.md.CI
e2e-android-maestroruns on GitHub-hosted runners with a per-app emulator matrix, a cached AVD snapshot (warm boot), and theaosp_atdsystem image — notgoogle_apis, whose Play Services and launcher ANR on the headless software-GPU emulator and overlay the app under test. Green on both apps.Test-id contract
id:selectors match the node resource-id: Compose viatestTagsAsResourceId = true, Views via asetTestTagextension that setsviewIdResourceNamethrough anAccessibilityDelegateCompat(XMLandroid:idcan't hold kebab-case). SDK-sideaccessibilityIdentifiers surface ascontentDescription, matched by Maestro's text selector. The same selectors resolve against both apps.🤖 Generated with Claude Code