Fix UI tests

Change-Id: Ie42077d20523c28a61c75bccfdc11d8a34d8a8a9
pull/508/head
Don Turner 2 years ago
parent 66046a86b0
commit dd81618f89

@ -26,8 +26,11 @@ import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performScrollToNode import androidx.compose.ui.test.performScrollToNode
import com.google.samples.apps.nowinandroid.core.domain.model.FollowableTopic import com.google.samples.apps.nowinandroid.core.domain.model.FollowableTopic
import com.google.samples.apps.nowinandroid.core.domain.model.UserNewsResource import com.google.samples.apps.nowinandroid.core.domain.model.UserNewsResource
import com.google.samples.apps.nowinandroid.core.model.data.NewsResource
import com.google.samples.apps.nowinandroid.core.model.data.NewsResourceType.Video import com.google.samples.apps.nowinandroid.core.model.data.NewsResourceType.Video
import com.google.samples.apps.nowinandroid.core.model.data.Topic import com.google.samples.apps.nowinandroid.core.model.data.Topic
import com.google.samples.apps.nowinandroid.core.model.data.UserData
import com.google.samples.apps.nowinandroid.core.testing.repository.emptyUserData
import kotlinx.datetime.Instant import kotlinx.datetime.Instant
import org.junit.Before import org.junit.Before
import org.junit.Rule import org.junit.Rule
@ -177,29 +180,27 @@ private val testTopics = listOf(
private val sampleUserNewsResources = listOf( private val sampleUserNewsResources = listOf(
UserNewsResource( UserNewsResource(
id = "1", newsResource =
title = "Thanks for helping us reach 1M YouTube Subscribers", NewsResource(
content = "Thank you everyone for following the Now in Android series and everything the " + id = "1",
"Android Developers YouTube channel has to offer. During the Android Developer " + title = "Thanks for helping us reach 1M YouTube Subscribers",
"Summit, our YouTube channel reached 1 million subscribers! Heres a small video to " + content = "Thank you everyone for following the Now in Android series and everything the " +
"thank you all.", "Android Developers YouTube channel has to offer. During the Android Developer " +
url = "https://youtu.be/-fJ6poHQrjM", "Summit, our YouTube channel reached 1 million subscribers! Heres a small video to " +
headerImageUrl = "https://i.ytimg.com/vi/-fJ6poHQrjM/maxresdefault.jpg", "thank you all.",
publishDate = Instant.parse("2021-11-09T00:00:00.000Z"), url = "https://youtu.be/-fJ6poHQrjM",
type = Video, headerImageUrl = "https://i.ytimg.com/vi/-fJ6poHQrjM/maxresdefault.jpg",
followableTopics = listOf( publishDate = Instant.parse("2021-11-09T00:00:00.000Z"),
FollowableTopic( type = Video,
topic = Topic( topics = listOf (Topic(
id = "0", id = "0",
name = "Headlines", name = "Headlines",
shortDescription = "", shortDescription = "",
longDescription = TOPIC_DESC, longDescription = TOPIC_DESC,
url = "", url = "",
imageUrl = "" imageUrl = ""
), ))
isFollowed = false ),
) userData = emptyUserData.copy(bookmarkedNewsResources = setOf("1"))
),
isSaved = true
) )
) )

Loading…
Cancel
Save