A fully functional Android app built entirely with Kotlin and Jetpack Compose
Fix news_whenSuccessAndTopicIsSuccess_isShown test on small screen sizes
Caren Chang759b7a0df02d
diff --git a/feature-topic/src/androidTest/java/com/google/samples/apps/nowinandroid/feature/topic/TopicScreenTest.kt b/feature-topic/src/androidTest/java/com/google/samples/apps/nowinandroid/feature/topic/TopicScreenTest.ktindex 4c12d0096..855d753b9 100644--- a/feature-topic/src/androidTest/java/com/google/samples/apps/nowinandroid/feature/topic/TopicScreenTest.kt+++ b/feature-topic/src/androidTest/java/com/google/samples/apps/nowinandroid/feature/topic/TopicScreenTest.kt@@ -17,9 +17,13 @@package com.google.samples.apps.nowinandroid.feature.topicimport androidx.activity.ComponentActivity+import androidx.compose.ui.test.hasScrollToNodeAction+import androidx.compose.ui.test.hasTextimport androidx.compose.ui.test.junit4.createAndroidComposeRule+import androidx.compose.ui.test.onFirstimport androidx.compose.ui.test.onNodeWithContentDescriptionimport androidx.compose.ui.test.onNodeWithText+import androidx.compose.ui.test.performScrollToNodeimport com.google.samples.apps.nowinandroid.core.model.data.FollowableTopicimport com.google.samples.apps.nowinandroid.core.model.data.NewsResourceimport com.google.samples.apps.nowinandroid.core.model.data.NewsResourceType.Video@@ -115,10 +119,11 @@ class TopicScreenTest {)}- // First news title shown+ // Scroll to first news title if availablecomposeTestRule- .onNodeWithText(sampleNewsResources.first().title)- .assertExists()+ .onAllNodes(hasScrollToNodeAction())+ .onFirst()+ .performScrollToNode(hasText(sampleNewsResources.first().title))}}