diff --git a/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/AuthorsCarousel.kt b/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/AuthorsCarousel.kt index 6c74240ce..6099baaea 100644 --- a/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/AuthorsCarousel.kt +++ b/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/AuthorsCarousel.kt @@ -68,10 +68,11 @@ fun AuthorsCarousel( modifier: Modifier = Modifier ) { val lazyListState = rememberLazyListState() - TrackScrollJank(lazyListState, "ForYou:AuthorsCarousel") + val tag = "forYou:authors" + TrackScrollJank(scrollableState = lazyListState, stateName = tag) LazyRow( - modifier = modifier.testTag("forYou:authors"), + modifier = modifier.testTag(tag), contentPadding = PaddingValues(24.dp), horizontalArrangement = Arrangement.spacedBy(24.dp), state = lazyListState diff --git a/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt b/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt index fb27e0194..5b0222cdd 100644 --- a/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt +++ b/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt @@ -191,13 +191,15 @@ fun ForYouScreen( } } + val tag = "forYou:feed" + val lazyListState = rememberLazyListState() - TrackScrollJank(lazyListState, "ForYou:Feed") + TrackScrollJank(scrollableState = lazyListState, stateName = tag) LazyColumn( modifier = Modifier .fillMaxSize() - .testTag("forYou:feed"), + .testTag(tag), state = lazyListState, ) { InterestsSelection( @@ -324,7 +326,7 @@ private fun TopicSelection( modifier: Modifier = Modifier ) = trace("TopicSelection") { val lazyGridState = rememberLazyGridState() - TrackScrollJank(scrollableState = lazyGridState, stateName = "ForYou:TopicSelection") + TrackScrollJank(scrollableState = lazyGridState, stateName = "forYou:TopicSelection") LazyHorizontalGrid( state = lazyGridState,