maps: Google Maps-style bottom sheet makeover (#nav)
- Commit
f40bdd2dd6a82a42fe7361eaf55697b1cd7c6c73- Author
- Vayun Mathur <[email protected]>
- When
- 2026-11-16 21:52 UTC (19 days ago)
- Parents
a7ac3c2
Visual/UX overhaul of the sheet surfaces only. The SheetRoute stack, FreeHeightSheetState geometry, back behaviour and every navigation semantic are unchanged; wide mode gets the same content through the shared scope. Component mapping (current -> made-over): - Place sheet: the action row's Directions becomes a filled primary pill (semantic primary/onPrimary, no brand colour); Save/Share/Call/Website/Order stay label-under-icon actions, now as outlined circular buttons. The header title moves to headlineSmall and the subtitle line is category - price - straight-line distance from the user where a fix exists (routed distance stays on the route sheet). Tabs read Overview/Photos over the existing PoiSection values. Overview opens with a horizontal photo strip when the enrichment brought photos, then the existing icon-led rows (address, OSM/Google hours, phone, website, departures, menu); popular-times and the archive review summary render exactly where they already did — no new data sources. - Route sheet: the selected route and every gated Other routes alternative now render as RouteOptionCards — big duration, distance and arrival, transit line chips in line colours (LineBadge), the shown route highlighted with a primary outline; tapping a card still swaps it in, tapping again returns to the primary. Mode tabs (incl. the rideshare pseudo-tab) and the prominent Start button are unchanged. - Search sheet: results gain a pin leading icon and a right-aligned distance (from the Search route's bias centre, carried on SearchUiState) above the existing city/state/country trailing text; recents already carried the clock icon and keep it. - Departures/Trip sheets already used the shared modal chrome (drag handle, titles); Layers/Parking titles move to the same titleLarge sheet-title style. Tests: new MapsSheetMakeoverTest renders a selected route card (duration, arrival, line chip) and verifies its click; the RouteSheet steps test now asserts the last step row exists (composed below the new card). Verified: :maps:compileDevKotlin + unit-test compilation green, filtered sheet/place/route/alternative tests pass; full suite run follows.
Diff
maps/src/main/java/com/vayunmathur/maps/ui/LayersSheet.kt
diff --git a/maps/src/main/java/com/vayunmathur/maps/ui/LayersSheet.kt b/maps/src/main/java/com/vayunmathur/maps/ui/LayersSheet.ktindex 081729c883..d9a4a302bc 100644--- a/maps/src/main/java/com/vayunmathur/maps/ui/LayersSheet.kt+++ b/maps/src/main/java/com/vayunmathur/maps/ui/LayersSheet.kt@@ -46,7 +46,7 @@ fun LayersSheet( Column(Modifier.fillMaxWidth().padding(bottom = 24.dp)) { Text( stringResource(R.string.layers_title),- style = MaterialTheme.typography.titleMedium,+ style = MaterialTheme.typography.titleLarge, color = MaterialTheme.colorScheme.primary, modifier = Modifier.padding(start = 16.dp, end = 16.dp, top = 8.dp, bottom = 8.dp), )
maps/src/main/java/com/vayunmathur/maps/ui/MapPage.kt
diff --git a/maps/src/main/java/com/vayunmathur/maps/ui/MapPage.kt b/maps/src/main/java/com/vayunmathur/maps/ui/MapPage.ktindex 93ea3dd0e5..082e1aa662 100644--- a/maps/src/main/java/com/vayunmathur/maps/ui/MapPage.kt+++ b/maps/src/main/java/com/vayunmathur/maps/ui/MapPage.kt@@ -265,6 +265,8 @@ fun MapPage( results = searchResults, recents = searchRecents, searching = searching,+ nearLat = searchRoute?.nearLat ?: 0.0,+ nearLon = searchRoute?.nearLon ?: 0.0, ) val browsing = selectedFeature == null && !isNavigating // The bar is chrome, not a sheet, so it is composed away rather than animated out. Its
maps/src/main/java/com/vayunmathur/maps/ui/ParkingSheet.kt
diff --git a/maps/src/main/java/com/vayunmathur/maps/ui/ParkingSheet.kt b/maps/src/main/java/com/vayunmathur/maps/ui/ParkingSheet.ktindex c2c3e2a1cf..a46a53d6cf 100644--- a/maps/src/main/java/com/vayunmathur/maps/ui/ParkingSheet.kt+++ b/maps/src/main/java/com/vayunmathur/maps/ui/ParkingSheet.kt@@ -59,7 +59,7 @@ fun ParkingSheet( Column(Modifier.fillMaxWidth().padding(start = 16.dp, end = 16.dp, bottom = 24.dp)) { Text( stringResource(R.string.parking_title),- style = MaterialTheme.typography.titleMedium,+ style = MaterialTheme.typography.titleLarge, color = MaterialTheme.colorScheme.primary, ) Spacer(Modifier.height(4.dp))
maps/src/main/java/com/vayunmathur/maps/ui/PlaceActionRow.kt
diff --git a/maps/src/main/java/com/vayunmathur/maps/ui/PlaceActionRow.kt b/maps/src/main/java/com/vayunmathur/maps/ui/PlaceActionRow.ktindex 1b0a3f917c..ecb0898eee 100644--- a/maps/src/main/java/com/vayunmathur/maps/ui/PlaceActionRow.kt+++ b/maps/src/main/java/com/vayunmathur/maps/ui/PlaceActionRow.kt@@ -2,6 +2,7 @@ package com.vayunmathur.maps.ui import android.content.Context import android.content.Intent+import androidx.compose.foundation.border import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box@@ -49,13 +50,35 @@ internal fun PlaceActionRow( ) { val context = LocalContext.current - Row(modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(8.dp)) {- PlaceAction(- Modifier.weight(1f),- { IconDirections() },- stringResource(if (inactiveNavigation == null) R.string.directions else R.string.add_stop_to_route),- onClick = requestDirections,- )+ Row(+ modifier.fillMaxWidth(),+ horizontalArrangement = Arrangement.spacedBy(8.dp),+ verticalAlignment = Alignment.CenterVertically,+ ) {+ // Directions is the primary action: a filled pill, Google-Maps style,+ // rather than one more circular icon button in the row.+ Surface(+ shape = RoundedCornerShape(percent = 50),+ color = MaterialTheme.colorScheme.primary,+ modifier = Modifier+ .weight(1.3f)+ .clip(RoundedCornerShape(percent = 50))+ .clickable(onClick = requestDirections),+ ) {+ Row(+ Modifier.padding(horizontal = 14.dp, vertical = 12.dp),+ horizontalArrangement = Arrangement.Center,+ verticalAlignment = Alignment.CenterVertically,+ ) {+ IconDirections(tint = MaterialTheme.colorScheme.onPrimary)+ Text(+ stringResource(if (inactiveNavigation == null) R.string.directions else R.string.add_stop_to_route),+ style = MaterialTheme.typography.labelLarge,+ color = MaterialTheme.colorScheme.onPrimary,+ modifier = Modifier.padding(start = 6.dp),+ )+ }+ } phone?.let { PlaceAction(Modifier.weight(1f), { IconCall() }, stringResource(UiR.string.call)) { goto(context, "tel:$it")@@ -104,7 +127,13 @@ private fun PlaceAction( horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(4.dp), ) {- Surface(shape = CircleShape, color = MaterialTheme.colorScheme.surfaceVariant, modifier = Modifier.size(44.dp)) {+ Surface(+ shape = CircleShape,+ color = MaterialTheme.colorScheme.surface,+ modifier = Modifier+ .size(44.dp)+ .border(1.dp, MaterialTheme.colorScheme.outlineVariant, CircleShape),+ ) { Box(contentAlignment = Alignment.Center) { icon() } } Text(
maps/src/main/java/com/vayunmathur/maps/ui/PlaceSheet.kt
diff --git a/maps/src/main/java/com/vayunmathur/maps/ui/PlaceSheet.kt b/maps/src/main/java/com/vayunmathur/maps/ui/PlaceSheet.ktindex f65db690e9..efee1fda43 100644--- a/maps/src/main/java/com/vayunmathur/maps/ui/PlaceSheet.kt+++ b/maps/src/main/java/com/vayunmathur/maps/ui/PlaceSheet.kt@@ -39,6 +39,7 @@ import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.setValue import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.ui.Modifier+import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Shape import androidx.compose.ui.platform.ClipEntry@@ -197,6 +198,25 @@ private fun PlaceSheetContent( showGoogleHours = openingHours == null, modifier = modifier, ) {+ // Overview opens with the photo strip when the enrichment brought+ // photos (the full gallery stays on the Photos tab).+ if (poi?.photoUrls?.isNotEmpty() == true) {+ androidx.compose.foundation.lazy.LazyRow(+ horizontalArrangement = Arrangement.spacedBy(8.dp),+ modifier = Modifier.fillMaxWidth(),+ ) {+ items(poi.photoUrls.size) { index ->+ com.vayunmathur.library.image.compose.AsyncImage(+ model = poi.photoUrls[index],+ contentDescription = null,+ modifier = Modifier+ .size(width = 160.dp, height = 96.dp)+ .clip(androidx.compose.foundation.shape.RoundedCornerShape(12.dp)),+ contentScale = androidx.compose.ui.layout.ContentScale.Crop,+ )+ }+ }+ } // Departures (train/transit stations): resolve the nearest Transitous // stop by coordinate and open its live board (see MapPage DeparturesSheet). onDepartures?.let { open ->
maps/src/main/java/com/vayunmathur/maps/ui/PlaceSheetHeader.kt
diff --git a/maps/src/main/java/com/vayunmathur/maps/ui/PlaceSheetHeader.kt b/maps/src/main/java/com/vayunmathur/maps/ui/PlaceSheetHeader.ktindex 9372e2904c..09dbb5e272 100644--- a/maps/src/main/java/com/vayunmathur/maps/ui/PlaceSheetHeader.kt+++ b/maps/src/main/java/com/vayunmathur/maps/ui/PlaceSheetHeader.kt@@ -188,7 +188,23 @@ private fun PlaceSheetHeaderContent( val orderDeepLink by rememberOrderDeepLink(context, feature, poi?.category) Column(modifier, verticalArrangement = Arrangement.spacedBy(12.dp)) {- PlaceHeader(feature.name, poi, feature as? SpecificFeature.GenericPlace)+ val userPos = panelState.userPosition+ val distanceText = if (userPos != null && (userPos.latitude != 0.0 || userPos.longitude != 0.0)) {+ com.vayunmathur.maps.util.formatDistance(+ com.vayunmathur.maps.util.AlternativeRoutes.run {+ // Straight-line distance for the subtitle line; the+ // routed distance lives on the route sheet.+ kotlin.math.hypot(+ (feature.position.longitude - userPos.longitude) * 111_320.0 *+ kotlin.math.cos(Math.toRadians(userPos.latitude)),+ (feature.position.latitude - userPos.latitude) * 110_540.0,+ )+ },+ )+ } else {+ null+ }+ PlaceHeader(feature.name, poi, feature as? SpecificFeature.GenericPlace, distanceText) PlaceActionRow( feature = feature, // OSM first, Google as the fallback. These used to be handed the OSM@@ -260,13 +276,17 @@ private fun PlaceHeader( name: String, poi: GooglePoiInfo?, offline: SpecificFeature.GenericPlace?,+ distanceText: String? = null, modifier: Modifier = Modifier, ) { Column(modifier, verticalArrangement = Arrangement.spacedBy(4.dp)) {- Text(name, style = MaterialTheme.typography.titleLarge)+ Text(name, style = MaterialTheme.typography.headlineSmall) - val subtitle = listOfNotNull(poi?.category?.ifBlank { null }, poi?.priceText?.ifBlank { null })- .joinToString(" \u00B7 ")+ val subtitle = listOfNotNull(+ poi?.category?.ifBlank { null },+ poi?.priceText?.ifBlank { null },+ distanceText,+ ).joinToString(" \u00B7 ") if (subtitle.isNotBlank()) { Text(subtitle, style = MaterialTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant) }
maps/src/main/java/com/vayunmathur/maps/ui/RouteSheet.kt
diff --git a/maps/src/main/java/com/vayunmathur/maps/ui/RouteSheet.kt b/maps/src/main/java/com/vayunmathur/maps/ui/RouteSheet.ktindex 5c349da165..a41de0a687 100644--- a/maps/src/main/java/com/vayunmathur/maps/ui/RouteSheet.kt+++ b/maps/src/main/java/com/vayunmathur/maps/ui/RouteSheet.kt@@ -50,6 +50,7 @@ import com.vayunmathur.maps.util.formatDistance import com.vayunmathur.maps.util.formatDuration import com.vayunmathur.maps.util.formatEta import androidx.compose.foundation.layout.size+import androidx.compose.foundation.border import androidx.compose.foundation.clickable /**@@ -197,6 +198,14 @@ fun RouteSheet( val routeForMode = route[selectedRouteType] if (routeForMode != null) {+ if (routeForMode is RouteService.Route) {+ RouteOptionCard(+ route = routeForMode,+ selected = selectedAlternative == null,+ onClick = { onSelectAlternative(null) },+ modifier = Modifier.padding(horizontal = Spacing.lg, vertical = Spacing.sm),+ )+ } if (routeForMode !is RouteService.EmptyRoute) { // Time and distance live in the selector now, so the summary row that // used to sit here would only repeat the selected tab.@@ -372,20 +381,71 @@ private fun AlternativesSection( val lines = alternative.step.mapNotNull { it.transitDetails?.transitLine?.let { line -> line.nameShort ?: line.name } }.distinct()- Card(- modifier = Modifier.fillMaxWidth().padding(top = Spacing.sm)- .clickable { onSelect(if (selected == alternative) null else alternative) },- ) {- ListItem({+ RouteOptionCard(+ route = alternative,+ selected = selected == alternative,+ onClick = { onSelect(if (selected == alternative) null else alternative) },+ modifier = Modifier.fillMaxWidth().padding(top = Spacing.sm),+ )+ }+ }+}++/**+ * One selectable route option: big duration, then distance/arrival and —+ * for transit — the boarded line chips in their line colours. The shown+ * route's card is highlighted with the primary outline.+ */+@Composable+internal fun RouteOptionCard(+ route: RouteService.Route,+ selected: Boolean,+ onClick: () -> Unit,+ modifier: Modifier = Modifier,+) {+ val context = LocalContext.current+ val lines = route.step.mapNotNull { it.transitDetails?.transitLine }.distinctBy { it.name }+ Card(+ modifier = modifier+ .clickable(onClick = onClick)+ .then(+ if (selected) {+ Modifier.border(+ 2.dp, MaterialTheme.colorScheme.primary,+ androidx.compose.foundation.shape.RoundedCornerShape(16.dp),+ )+ } else {+ Modifier+ },+ ),+ ) {+ Column(Modifier.padding(horizontal = Spacing.lg, vertical = Spacing.md)) {+ Row(verticalAlignment = Alignment.Bottom) {+ Text(+ formatDuration(context, route.duration),+ style = MaterialTheme.typography.headlineSmall,+ )+ route.arrivalTime?.let { arrival -> Text(- listOfNotNull(- formatDuration(context, alternative.duration),- formatDistance(alternative.distanceMeters),- lines.joinToString(" · ").takeIf { it.isNotBlank() },- stringResource(R.string.alternative_selected).takeIf { selected == alternative },- ).joinToString(" · "),+ " · $arrival",+ style = MaterialTheme.typography.bodyMedium,+ color = MaterialTheme.colorScheme.onSurfaceVariant,+ modifier = Modifier.padding(start = Spacing.sm), )- })+ }+ }+ Text(+ formatDistance(route.distanceMeters),+ style = MaterialTheme.typography.bodyMedium,+ color = MaterialTheme.colorScheme.onSurfaceVariant,+ )+ if (lines.isNotEmpty()) {+ Row(+ Modifier.padding(top = Spacing.sm),+ horizontalArrangement = Arrangement.spacedBy(6.dp),+ ) {+ lines.forEach { line -> LineBadge(line.nameShort ?: line.name, line.color) }+ } } } }
maps/src/main/java/com/vayunmathur/maps/ui/SearchSheet.kt
diff --git a/maps/src/main/java/com/vayunmathur/maps/ui/SearchSheet.kt b/maps/src/main/java/com/vayunmathur/maps/ui/SearchSheet.ktindex ccd7a0a525..183d5eeaba 100644--- a/maps/src/main/java/com/vayunmathur/maps/ui/SearchSheet.kt+++ b/maps/src/main/java/com/vayunmathur/maps/ui/SearchSheet.kt@@ -31,6 +31,7 @@ import com.vayunmathur.library.ui.IconBack import com.vayunmathur.library.ui.IconButton import com.vayunmathur.library.ui.IconClose import com.vayunmathur.library.ui.IconHistory+import com.vayunmathur.library.ui.IconLocationOn import com.vayunmathur.library.ui.ListItem import com.vayunmathur.library.ui.LoadingState import com.vayunmathur.library.ui.MaterialTheme@@ -88,7 +89,7 @@ fun SearchSheet( title = stringResource(R.string.no_results_found), modifier = Modifier.height(StatusBlockHeight), )- SearchPhase.Results -> ResultsList(state.results, actions)+ SearchPhase.Results -> ResultsList(state.results, actions, state.nearLat, state.nearLon) SearchPhase.Recents -> RecentsList(state.recents, actions) SearchPhase.Idle -> Box( Modifier.fillMaxWidth().height(StatusBlockHeight),@@ -150,11 +151,27 @@ private fun SearchField(query: String, actions: SearchActions, autoFocus: Boolea } @Composable-private fun ResultsList(results: List<SearchResult>, actions: SearchActions) {+private fun ResultsList(+ results: List<SearchResult>,+ actions: SearchActions,+ nearLat: Double = 0.0,+ nearLon: Double = 0.0,+) { LazyColumn(Modifier.fillMaxWidth()) { items(results, key = { it.id }) { result ->+ val distanceText = if (nearLat != 0.0 || nearLon != 0.0) {+ com.vayunmathur.maps.util.formatDistance(+ kotlin.math.hypot(+ (result.lon - nearLon) * 111_320.0 * kotlin.math.cos(Math.toRadians(nearLat)),+ (result.lat - nearLat) * 110_540.0,+ ),+ )+ } else {+ null+ } ListItem( content = { Text(result.title) },+ leadingContent = { IconLocationOn(tint = MaterialTheme.colorScheme.onSurfaceVariant) }, supportingContent = { Text( result.subtitle@@ -164,17 +181,27 @@ private fun ResultsList(results: List<SearchResult>, actions: SearchActions) { // Where the place is, so two same-named rows (every "Starbucks") can be told // apart at a glance. Capped in width and lines so a long "City, State, // Country" never squeezes the name itself.- trailingContent = result.locality?.let { locality ->- {- Text(- locality,- modifier = Modifier.widthIn(max = LocalityMaxWidth),- style = MaterialTheme.typography.bodySmall,- color = MaterialTheme.colorScheme.onSurfaceVariant,- textAlign = TextAlign.End,- maxLines = 2,- overflow = TextOverflow.Ellipsis,- )+ trailingContent = {+ Column(horizontalAlignment = Alignment.End) {+ distanceText?.let { distance ->+ Text(+ distance,+ style = MaterialTheme.typography.bodyMedium,+ color = MaterialTheme.colorScheme.onSurfaceVariant,+ textAlign = TextAlign.End,+ )+ }+ result.locality?.let { locality ->+ Text(+ locality,+ modifier = Modifier.widthIn(max = LocalityMaxWidth),+ style = MaterialTheme.typography.bodySmall,+ color = MaterialTheme.colorScheme.onSurfaceVariant,+ textAlign = TextAlign.End,+ maxLines = 2,+ overflow = TextOverflow.Ellipsis,+ )+ } } }, modifier = Modifier.clickable { actions.selectResult(result) },
maps/src/main/java/com/vayunmathur/maps/util/MapsUiContract.kt
diff --git a/maps/src/main/java/com/vayunmathur/maps/util/MapsUiContract.kt b/maps/src/main/java/com/vayunmathur/maps/util/MapsUiContract.ktindex fd76452f03..06cb47cb15 100644--- a/maps/src/main/java/com/vayunmathur/maps/util/MapsUiContract.kt+++ b/maps/src/main/java/com/vayunmathur/maps/util/MapsUiContract.kt@@ -20,6 +20,9 @@ data class SearchUiState( val recents: List<String> = emptyList(), /** Whether a search is running. See [SearchPhase]. */ val searching: Boolean = false,+ /** Search bias centre, for per-result distances. 0 = unknown. */+ val nearLat: Double = 0.0,+ val nearLon: Double = 0.0, ) { /** * What the results area should show.
maps/src/main/res/values/strings.xml
diff --git a/maps/src/main/res/values/strings.xml b/maps/src/main/res/values/strings.xmlindex 0e0e1ca095..20df5a5582 100644--- a/maps/src/main/res/values/strings.xml+++ b/maps/src/main/res/values/strings.xml@@ -61,7 +61,7 @@ <string name="poi_fuel_price_header">Fuel price</string> <!-- Place detail: Label of the first tab under the action buttons, holding the description, address and opening hours. Noun, plural. -->- <string name="poi_tab_details">Details</string>+ <string name="poi_tab_details">Overview</string> <!-- Place detail: Photos section header. Noun. --> <string name="poi_photos_header">Photos</string> <!-- Place detail: Popular times section header. Noun phrase. -->
maps/src/test/java/com/vayunmathur/maps/ui/MapsSheetMakeoverTest.kt
diff --git a/maps/src/test/java/com/vayunmathur/maps/ui/MapsSheetMakeoverTest.kt b/maps/src/test/java/com/vayunmathur/maps/ui/MapsSheetMakeoverTest.ktnew file mode 100644index 0000000000..f76739c14b--- /dev/null+++ b/maps/src/test/java/com/vayunmathur/maps/ui/MapsSheetMakeoverTest.kt@@ -0,0 +1,64 @@+package com.vayunmathur.maps.ui++import androidx.compose.ui.test.assertIsDisplayed+import androidx.compose.ui.test.junit4.createComposeRule+import androidx.compose.ui.test.onNodeWithText+import androidx.compose.ui.test.performClick+import com.vayunmathur.library.map.GeoPoint+import com.vayunmathur.library.ui.DynamicTheme+import com.vayunmathur.maps.util.RouteService+import kotlin.test.Test+import kotlin.test.assertEquals+import kotlin.time.Duration.Companion.minutes+import org.junit.Rule+import org.junit.runner.RunWith+import org.robolectric.RobolectricTestRunner+import org.robolectric.annotation.GraphicsMode++/** The Google-Maps-style sheet makeover: route option cards render and select. */+@RunWith(RobolectricTestRunner::class)+@GraphicsMode(GraphicsMode.Mode.NATIVE)+class MapsSheetMakeoverTest {++ @get:Rule val rule = createComposeRule()++ private fun route(minutes: Int, line: String?): RouteService.Route {+ val steps = listOf(+ RouteService.Step(+ distanceMeters = 5_000.0, staticDuration = 10.minutes,+ polyline = listOf(GeoPoint(0.0, 0.0), GeoPoint(0.02, 0.0)),+ navInstruction = RouteService.API.NavInstruction(),+ travelMode = RouteService.TravelMode.TRANSIT,+ transitDetails = line?.let {+ RouteService.API.TransitDetails(+ headsign = "Downtown", stopCount = 4,+ transitLine = RouteService.API.TransitLine(name = it, nameShort = it, color = "#c00"),+ stopDetails = RouteService.API.StopDetails(+ arrivalTime = "10:10", departureTime = "10:00",+ arrivalStop = RouteService.API.Stop("C"),+ departureStop = RouteService.API.Stop("A"),+ ),+ )+ },+ ),+ )+ return RouteService.Route(+ duration = minutes.minutes, distanceMeters = 5_000.0,+ polyline = steps.first().polyline, step = steps, arrivalTime = "10:10",+ )+ }++ @Test+ fun `route option card shows duration arrival and line chip and clicks`() {+ var clicks = 0+ rule.setContent {+ DynamicTheme {+ RouteOptionCard(route = route(14, "Red"), selected = true, onClick = { clicks++ })+ }+ }+ rule.onNodeWithText("Red").assertIsDisplayed()+ rule.onNodeWithText("10:10", substring = true).assertIsDisplayed()+ rule.onNodeWithText("Red").performClick()+ assertEquals(1, clicks)+ }+}
maps/src/test/java/com/vayunmathur/maps/ui/RouteSheetSlice3ExtraTest.kt
diff --git a/maps/src/test/java/com/vayunmathur/maps/ui/RouteSheetSlice3ExtraTest.kt b/maps/src/test/java/com/vayunmathur/maps/ui/RouteSheetSlice3ExtraTest.ktindex 53e8edd10c..783d8eef6d 100644--- a/maps/src/test/java/com/vayunmathur/maps/ui/RouteSheetSlice3ExtraTest.kt+++ b/maps/src/test/java/com/vayunmathur/maps/ui/RouteSheetSlice3ExtraTest.kt@@ -74,7 +74,9 @@ class RouteSheetSlice3ExtraTest { } rule.onNodeWithText("Head north on Main St").assertIsDisplayed() rule.onNodeWithText("Leave at", substring = true).assertIsDisplayed()- rule.onNodeWithText("Arrive at", substring = true).assertIsDisplayed()+ // The selected route card sits above the steps now, so the last+ // step row is composed but below the test viewport fold.+ rule.onNodeWithText("Arrive at", substring = true).assertExists() // Start Navigation is offered for the drive route while Idle rule.onNodeWithText("Start Navigation").assertIsDisplayed() // Walk tab -> EmptyRoute message