Restore original `type` labels

pull/902/head
Simon Marquis 1 year ago
parent 480d8e7d7c
commit daa2228132

@ -163,7 +163,7 @@ private val sampleNewsResources = listOf(
url = "https://youtu.be/-fJ6poHQrjM",
headerImageUrl = "https://i.ytimg.com/vi/-fJ6poHQrjM/maxresdefault.jpg",
publishDate = Instant.parse("2021-11-09T00:00:00.000Z"),
type = "Video",
type = "Video 📺",
topics = listOf(sampleTopic1),
),
NewsResource(
@ -175,7 +175,7 @@ private val sampleNewsResources = listOf(
url = "https://youtu.be/ZARz0pjm5YM",
headerImageUrl = "https://i.ytimg.com/vi/ZARz0pjm5YM/maxresdefault.jpg",
publishDate = Instant.parse("2021-11-01T00:00:00.000Z"),
type = "Video",
type = "Video 📺",
topics = listOf(sampleTopic1, sampleTopic2),
),
NewsResource(
@ -185,7 +185,7 @@ private val sampleNewsResources = listOf(
url = "https://youtu.be/r5JgIyS3t3s",
headerImageUrl = "https://i.ytimg.com/vi/r5JgIyS3t3s/maxresdefault.jpg",
publishDate = Instant.parse("2021-11-08T00:00:00.000Z"),
type = "Video",
type = "Video 📺",
topics = listOf(sampleTopic2),
),
)

@ -44,7 +44,7 @@ class UserNewsResourceTest {
url = "Test URL",
headerImageUrl = "Test image URL",
publishDate = Clock.System.now(),
type = "Article",
type = "Article 📚",
topics = listOf(
Topic(
id = "T1",

@ -55,7 +55,7 @@ class NetworkEntityKtTest {
url = "url",
headerImageUrl = "headerImageUrl",
publishDate = Instant.fromEpochMilliseconds(1),
type = "Article",
type = "Article 📚",
)
val entity = networkModel.asEntity()
@ -65,7 +65,7 @@ class NetworkEntityKtTest {
assertEquals("url", entity.url)
assertEquals("headerImageUrl", entity.headerImageUrl)
assertEquals(Instant.fromEpochMilliseconds(1), entity.publishDate)
assertEquals("Article", entity.type)
assertEquals("Article 📚", entity.type)
val expandedNetworkModel =
NetworkNewsResourceExpanded(
@ -75,7 +75,7 @@ class NetworkEntityKtTest {
url = "url",
headerImageUrl = "headerImageUrl",
publishDate = Instant.fromEpochMilliseconds(1),
type = "Article",
type = "Article 📚",
)
val entityFromExpanded = expandedNetworkModel.asEntity()
@ -86,6 +86,6 @@ class NetworkEntityKtTest {
assertEquals("url", entityFromExpanded.url)
assertEquals("headerImageUrl", entityFromExpanded.headerImageUrl)
assertEquals(Instant.fromEpochMilliseconds(1), entityFromExpanded.publishDate)
assertEquals("Article", entityFromExpanded.type)
assertEquals("Article 📚", entityFromExpanded.type)
}
}

@ -32,7 +32,7 @@ class PopulatedNewsResourceKtTest {
content = "Hilt",
url = "url",
headerImageUrl = "headerImageUrl",
type = "Video",
type = "Video 📺",
publishDate = Instant.fromEpochMilliseconds(1),
),
topics = listOf(
@ -55,7 +55,7 @@ class PopulatedNewsResourceKtTest {
content = "Hilt",
url = "url",
headerImageUrl = "headerImageUrl",
type = "Video",
type = "Video 📺",
publishDate = Instant.fromEpochMilliseconds(1),
topics = listOf(
Topic(

@ -304,5 +304,5 @@ private fun testNewsResource(
url = "",
headerImageUrl = "",
publishDate = Instant.fromEpochMilliseconds(millisSinceEpoch),
type = "DAC",
type = "Article 📚",
)

@ -41,7 +41,7 @@ val newsResourcesTestData: List<NewsResource> = listOf(
url = "https://youtu.be/-fJ6poHQrjM",
headerImageUrl = "https://i.ytimg.com/vi/-fJ6poHQrjM/maxresdefault.jpg",
publishDate = Instant.parse("2021-11-09T00:00:00.000Z"),
type = "Video",
type = "Video 📺",
topics = listOf(topicsTestData[0], topicsTestData[1]),
),
NewsResource(
@ -54,7 +54,7 @@ val newsResourcesTestData: List<NewsResource> = listOf(
url = "https://youtu.be/ZARz0pjm5YM",
headerImageUrl = "https://i.ytimg.com/vi/ZARz0pjm5YM/maxresdefault.jpg",
publishDate = Instant.parse("2021-11-01T00:00:00.000Z"),
type = "Video",
type = "Video 📺",
topics = listOf(topicsTestData[2]),
),
NewsResource(

@ -69,7 +69,7 @@ val userNewsResourcesTestData: List<UserNewsResource> = UserData(
url = "https://youtu.be/-fJ6poHQrjM",
headerImageUrl = "https://i.ytimg.com/vi/-fJ6poHQrjM/maxresdefault.jpg",
publishDate = Instant.parse("2021-11-09T00:00:00.000Z"),
type = "Video",
type = "Video 📺",
topics = topicsTestData.take(2),
),
userData = userData,
@ -85,7 +85,7 @@ val userNewsResourcesTestData: List<UserNewsResource> = UserData(
url = "https://youtu.be/ZARz0pjm5YM",
headerImageUrl = "https://i.ytimg.com/vi/ZARz0pjm5YM/maxresdefault.jpg",
publishDate = Instant.parse("2021-11-01T00:00:00.000Z"),
type = "Video",
type = "Video 📺",
topics = listOf(topicsTestData[2]),
),
userData = userData,

@ -111,7 +111,7 @@ object PreviewParameterData {
url = "https://youtu.be/-fJ6poHQrjM",
headerImageUrl = "https://i.ytimg.com/vi/-fJ6poHQrjM/maxresdefault.jpg",
publishDate = Instant.parse("2021-11-09T00:00:00.000Z"),
type = "Video",
type = "Video 📺",
topics = topics.take(2),
),
userData = userData,
@ -127,7 +127,7 @@ object PreviewParameterData {
url = "https://youtu.be/ZARz0pjm5YM",
headerImageUrl = "https://i.ytimg.com/vi/ZARz0pjm5YM/maxresdefault.jpg",
publishDate = Instant.parse("2021-11-01T00:00:00.000Z"),
type = "Video",
type = "Video 📺",
topics = listOf(topics[2]),
),
userData = userData,

@ -544,7 +544,7 @@ private val sampleNewsResources = listOf(
url = "https://youtu.be/-fJ6poHQrjM",
headerImageUrl = "https://i.ytimg.com/vi/-fJ6poHQrjM/maxresdefault.jpg",
publishDate = Instant.parse("2021-11-09T00:00:00.000Z"),
type = "Video",
type = "Video 📺",
topics = listOf(
Topic(
id = "0",
@ -565,7 +565,7 @@ private val sampleNewsResources = listOf(
url = "https://youtu.be/ZARz0pjm5YM",
headerImageUrl = "https://i.ytimg.com/vi/ZARz0pjm5YM/maxresdefault.jpg",
publishDate = Instant.parse("2021-11-01T00:00:00.000Z"),
type = "Video",
type = "Video 📺",
topics = listOf(
Topic(
id = "1",
@ -584,7 +584,7 @@ private val sampleNewsResources = listOf(
url = "https://youtu.be/r5JgIyS3t3s",
headerImageUrl = "https://i.ytimg.com/vi/r5JgIyS3t3s/maxresdefault.jpg",
publishDate = Instant.parse("2021-11-08T00:00:00.000Z"),
type = "Video",
type = "Video 📺",
topics = listOf(
Topic(
id = "1",

@ -257,7 +257,7 @@ private val sampleNewsResources = listOf(
url = "https://youtu.be/-fJ6poHQrjM",
headerImageUrl = "https://i.ytimg.com/vi/-fJ6poHQrjM/maxresdefault.jpg",
publishDate = Instant.parse("2021-11-09T00:00:00.000Z"),
type = "Video",
type = "Video 📺",
topics = listOf(
Topic(
id = "0",

Loading…
Cancel
Save