Conversation
BackgroundColorCustomizationProgrammaticDemoActivity cast the map type switch to CheckBox, which crashed on recreate, and never requested the map on first launch. The spinner demos declared the selected view as non-null, which crashed LayersDemoActivity on recreate.
Each demo in java-app and kotlin-app is launched, its map or panorama must become ready, the map is zoomed out and in, and the activity is recreated. Demos are read from the manifest, so new ones are covered automatically. Runs in a separate workflow on an API 36 emulator.
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 an end-to-end smoke test for ApiDemos, matching the ones in android-maps-utils (#1805) and android-maps-compose (#1007).
For every demo activity in
java-appandkotlin-app(read from the manifest, so new demos are picked up with no test change), the test:requireMapLoaded=true,Demos that need a map ID (advanced markers and the two data-driven styling demos) are skipped when none is configured.
Bugs it found (fixed here)
BackgroundColorCustomizationProgrammaticDemoActivity(Kotlin) cast the map type switch toCheckBox, so it crashed on rotation. It also only calledgetMapAsyncafter a recreate, so on first launch the toggle did nothing. Now matches the Java version.LayersDemoActivity(Kotlin) crashed on rotation: the spinner callsonItemSelectedwith a null view, and the override declared it non-null. Same signature fixed inCircleDemoActivityandPolylineDemoActivity.CI
demo-smoke-test.ymlruns both apps on an API 36 emulator (Ubuntu with KVM). Older images bundle a Play services version where advanced markers crash.instrumentation-test.ymlexcludes thesmokepackage.Like the existing instrumentation workflow, this needs the
ACTIONS_API_KEYsecret, which this repo does not have yet, so the job is skipped until an admin adds it.Local results (API 34 emulator, real key)
demoLaunchesAndShowsMap[PolylineDemoActivity]) was missing from the full run's report and passed when rerun alone.The Gradle report lists skipped tests as failures, but the build passes.
A follow-up will add a menu navigation test once the catalog stack (#2422 to #2428) lands.
BEGIN_COMMIT_OVERRIDE
fix: crash on rotation in Kotlin BackgroundColorCustomizationProgrammaticDemoActivity
fix: crash on rotation in Kotlin LayersDemoActivity
test: add a smoke test that opens every ApiDemos demo
END_COMMIT_OVERRIDE