Skip to content

test: integrate Android Maps Testing Toolkit v1.1.0-rc01 across all modules - #1798

Draft
dkhawk wants to merge 1 commit into
mainfrom
test/maps-testing-toolkit
Draft

dkhawk wants to merge 1 commit into
mainfrom
test/maps-testing-toolkit

Conversation

@dkhawk

@dkhawk dkhawk commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Integrates the Android Maps Testing Toolkit (v1.1.0-rc01: com.google.android.maps.robolectric:shadows, com.google.android.maps.testing:golden, and com.google.android.maps.testing:visual) across all 5 Android library modules (:library, :clustering, :data, :heatmaps, and :ui) to enable deterministic JVM Robolectric map shadow tests and offline golden/visual verification.

Note

Kept in Draft until com.google.android.maps.robolectric:shadows:1.1.0 and com.google.android.maps.testing:golden:1.1.0 are published to Maven Central / Google Maven (currently resolved via mavenLocal()).

Test Suites Added (72 New Robolectric + Maps Shadow & Golden Tests)

  • :library (MapsToolkitLibraryTest.kt — 32 tests):
    • Canonical & legacy KTX DSL builders (addMarker, addPolygon, addPolyline, addCircle, addGroundOverlay, addTileOverlay, buildCameraPosition, MapView.awaitMap)
    • Coroutine callbackFlow event streams (cameraEvents, cameraMoveEvents, cameraIdleEvents, markerClickEvents, polygonClickEvents, circleClickEvents, groundOverlayClickEvents, mapClickEvents, indoorBuildingEvents)
    • Multi-layer MarkerManager, PolygonManager, PolylineManager, CircleManager, GroundOverlayManager isolation and synchronous main-thread listener registration
    • Spherical geometry, PolyUtil, Bounds, and PointQuadTree spatial invariants with LatLngSubject & LatLngBoundsSubject
  • :clustering (MapsToolkitClusteringTest.kt — 12 tests):
    • ClusterManager + DefaultClusterRenderer zoom transitions (NonHierarchicalDistanceBasedAlgorithm, GridBasedAlgorithm, NonHierarchicalViewBasedAlgorithm, PreCachingAlgorithmDecorator)
    • Dynamic onClusterItemUpdated regression tests for clearing title/snippet to null and updating zIndex in-place
  • :data (MapsToolkitDataLayerTest.kt — 12 tests):
    • GeoJsonLayer and KmlLayer parsing, rendering, style propagation (GeoJsonPointStyle title/snippet/draggable/flat/visible/anchor/icon, <MultiGeometry> & GeoJsonMultiLineString CompositeStyle), Document-level hasPlacemarks()/getGroundOverlays(), KmlLayer.removeLayerFromMap() ground overlay cleanup, and shared MapObjectManager coexistence
  • :heatmaps (MapsToolkitHeatmapsTest.kt — 9 tests):
    • HeatmapTileProvider ARGB pixel verification, PixelSimilarityEngine golden comparison, ZoomLevelSweep (z=0, 5, 10, 15, 22), upper-bound maxX/maxY clamping, antimeridian dateline wrapping, and parameter validation
  • :ui (MapsToolkitUiTest.kt — 7 tests):
    • IconGenerator + BubbleDrawable + RotationLayout bitmap dimension & PixelSimilarityEngine verification (including negative multi-turn angles) and AnimationUtil.animateMarkerTo ShadowLooper trajectory verification

Verification

./gradlew :library:testDebugUnitTest :clustering:testDebugUnitTest :data:testDebugUnitTest :heatmaps:testDebugUnitTest :ui:testDebugUnitTest :lint-checks:test --offline

All 159 tests across all 6 modules pass (BUILD SUCCESSFUL).

@dkhawk
dkhawk requested a review from LoyalAbbas September 30, 2026 00:40
@dkhawk
dkhawk force-pushed the test/maps-testing-toolkit branch from aaa5bd7 to e9953a4 Compare September 30, 2026 16:43
@dkhawk
dkhawk force-pushed the fix/testing-toolkit-findings branch from 7209983 to d1cccca Compare September 30, 2026 16:43
@dkhawk
dkhawk force-pushed the test/maps-testing-toolkit branch from e9953a4 to 1080d15 Compare September 30, 2026 21:14
Base automatically changed from fix/testing-toolkit-findings to feat/migrate-ktx-to-utils September 30, 2026 22:24
@dkhawk
dkhawk force-pushed the test/maps-testing-toolkit branch 2 times, most recently from 9a3d441 to d2974de Compare September 30, 2026 23:25
Base automatically changed from feat/migrate-ktx-to-utils to main September 30, 2026 23:37
@dkhawk
dkhawk force-pushed the test/maps-testing-toolkit branch from d2974de to d5122ac Compare September 30, 2026 23:41
@dkhawk
dkhawk force-pushed the test/maps-testing-toolkit branch from d5122ac to c6af103 Compare October 9, 2026 15:34
@dkhawk
dkhawk force-pushed the test/maps-testing-toolkit branch from c6af103 to 3c20ba1 Compare October 9, 2026 21:56
@googlemaps-bot

Copy link
Copy Markdown
Contributor

Code Coverage

Overall Project 67.15% 🍏

There is no coverage information present for the Files changed

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants