|
|
@ -58,12 +58,12 @@ class ForYouViewModelTest {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* A pairing of [ForYouInterestsSelectionState] and [ForYouFeedState] for ease of testing
|
|
|
|
* A pairing of [ForYouInterestsSelectionUiState] and [ForYouFeedUiState] for ease of testing
|
|
|
|
* state updates as a single flow.
|
|
|
|
* state updates as a single flow.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private data class ForYouUiState(
|
|
|
|
private data class ForYouUiState(
|
|
|
|
val interestsSelectionState: ForYouInterestsSelectionState,
|
|
|
|
val interestsSelectionState: ForYouInterestsSelectionUiState,
|
|
|
|
val feedState: ForYouFeedState,
|
|
|
|
val feedState: ForYouFeedUiState,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
private val ForYouViewModel.uiState
|
|
|
|
private val ForYouViewModel.uiState
|
|
|
@ -79,8 +79,8 @@ class ForYouViewModelTest {
|
|
|
|
viewModel.uiState.test {
|
|
|
|
viewModel.uiState.test {
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouInterestsSelectionState.Loading,
|
|
|
|
ForYouInterestsSelectionUiState.Loading,
|
|
|
|
ForYouFeedState.Loading
|
|
|
|
ForYouFeedUiState.Loading
|
|
|
|
),
|
|
|
|
),
|
|
|
|
awaitItem()
|
|
|
|
awaitItem()
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -93,8 +93,8 @@ class ForYouViewModelTest {
|
|
|
|
viewModel.uiState.test {
|
|
|
|
viewModel.uiState.test {
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouInterestsSelectionState.Loading,
|
|
|
|
ForYouInterestsSelectionUiState.Loading,
|
|
|
|
ForYouFeedState.Loading
|
|
|
|
ForYouFeedUiState.Loading
|
|
|
|
),
|
|
|
|
),
|
|
|
|
awaitItem()
|
|
|
|
awaitItem()
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -109,8 +109,8 @@ class ForYouViewModelTest {
|
|
|
|
viewModel.uiState.test {
|
|
|
|
viewModel.uiState.test {
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouInterestsSelectionState.Loading,
|
|
|
|
ForYouInterestsSelectionUiState.Loading,
|
|
|
|
ForYouFeedState.Loading
|
|
|
|
ForYouFeedUiState.Loading
|
|
|
|
),
|
|
|
|
),
|
|
|
|
awaitItem()
|
|
|
|
awaitItem()
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -125,8 +125,8 @@ class ForYouViewModelTest {
|
|
|
|
viewModel.uiState.test {
|
|
|
|
viewModel.uiState.test {
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouInterestsSelectionState.Loading,
|
|
|
|
ForYouInterestsSelectionUiState.Loading,
|
|
|
|
ForYouFeedState.Loading
|
|
|
|
ForYouFeedUiState.Loading
|
|
|
|
),
|
|
|
|
),
|
|
|
|
awaitItem()
|
|
|
|
awaitItem()
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -141,8 +141,8 @@ class ForYouViewModelTest {
|
|
|
|
viewModel.uiState.test {
|
|
|
|
viewModel.uiState.test {
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouInterestsSelectionState.Loading,
|
|
|
|
ForYouInterestsSelectionUiState.Loading,
|
|
|
|
ForYouFeedState.Loading
|
|
|
|
ForYouFeedUiState.Loading
|
|
|
|
),
|
|
|
|
),
|
|
|
|
awaitItem()
|
|
|
|
awaitItem()
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -166,7 +166,7 @@ class ForYouViewModelTest {
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
interestsSelectionState =
|
|
|
|
interestsSelectionState =
|
|
|
|
ForYouInterestsSelectionState.WithInterestsSelection(
|
|
|
|
ForYouInterestsSelectionUiState.WithInterestsSelection(
|
|
|
|
topics = listOf(
|
|
|
|
topics = listOf(
|
|
|
|
FollowableTopic(
|
|
|
|
FollowableTopic(
|
|
|
|
topic = Topic(
|
|
|
|
topic = Topic(
|
|
|
@ -238,7 +238,7 @@ class ForYouViewModelTest {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
feedState = ForYouFeedState.Success(
|
|
|
|
feedState = ForYouFeedUiState.Success(
|
|
|
|
feed = emptyList()
|
|
|
|
feed = emptyList()
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -263,7 +263,7 @@ class ForYouViewModelTest {
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
interestsSelectionState =
|
|
|
|
interestsSelectionState =
|
|
|
|
ForYouInterestsSelectionState.WithInterestsSelection(
|
|
|
|
ForYouInterestsSelectionUiState.WithInterestsSelection(
|
|
|
|
topics = listOf(
|
|
|
|
topics = listOf(
|
|
|
|
FollowableTopic(
|
|
|
|
FollowableTopic(
|
|
|
|
topic = Topic(
|
|
|
|
topic = Topic(
|
|
|
@ -335,7 +335,7 @@ class ForYouViewModelTest {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
feedState = ForYouFeedState.Success(
|
|
|
|
feedState = ForYouFeedUiState.Success(
|
|
|
|
feed = emptyList()
|
|
|
|
feed = emptyList()
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -359,8 +359,8 @@ class ForYouViewModelTest {
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
interestsSelectionState =
|
|
|
|
interestsSelectionState =
|
|
|
|
ForYouInterestsSelectionState.NoInterestsSelection,
|
|
|
|
ForYouInterestsSelectionUiState.NoInterestsSelection,
|
|
|
|
feedState = ForYouFeedState.Loading
|
|
|
|
feedState = ForYouFeedUiState.Loading
|
|
|
|
),
|
|
|
|
),
|
|
|
|
awaitItem()
|
|
|
|
awaitItem()
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -370,8 +370,8 @@ class ForYouViewModelTest {
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
interestsSelectionState =
|
|
|
|
interestsSelectionState =
|
|
|
|
ForYouInterestsSelectionState.NoInterestsSelection,
|
|
|
|
ForYouInterestsSelectionUiState.NoInterestsSelection,
|
|
|
|
feedState = ForYouFeedState.Success(
|
|
|
|
feedState = ForYouFeedUiState.Success(
|
|
|
|
feed = sampleNewsResources.map {
|
|
|
|
feed = sampleNewsResources.map {
|
|
|
|
SaveableNewsResource(
|
|
|
|
SaveableNewsResource(
|
|
|
|
newsResource = it,
|
|
|
|
newsResource = it,
|
|
|
@ -400,8 +400,8 @@ class ForYouViewModelTest {
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
interestsSelectionState =
|
|
|
|
interestsSelectionState =
|
|
|
|
ForYouInterestsSelectionState.NoInterestsSelection,
|
|
|
|
ForYouInterestsSelectionUiState.NoInterestsSelection,
|
|
|
|
feedState = ForYouFeedState.Loading
|
|
|
|
feedState = ForYouFeedUiState.Loading
|
|
|
|
),
|
|
|
|
),
|
|
|
|
awaitItem()
|
|
|
|
awaitItem()
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -411,8 +411,8 @@ class ForYouViewModelTest {
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
interestsSelectionState =
|
|
|
|
interestsSelectionState =
|
|
|
|
ForYouInterestsSelectionState.NoInterestsSelection,
|
|
|
|
ForYouInterestsSelectionUiState.NoInterestsSelection,
|
|
|
|
feedState = ForYouFeedState.Success(
|
|
|
|
feedState = ForYouFeedUiState.Success(
|
|
|
|
feed = sampleNewsResources.map {
|
|
|
|
feed = sampleNewsResources.map {
|
|
|
|
SaveableNewsResource(
|
|
|
|
SaveableNewsResource(
|
|
|
|
newsResource = it,
|
|
|
|
newsResource = it,
|
|
|
@ -445,7 +445,7 @@ class ForYouViewModelTest {
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
interestsSelectionState =
|
|
|
|
interestsSelectionState =
|
|
|
|
ForYouInterestsSelectionState.WithInterestsSelection(
|
|
|
|
ForYouInterestsSelectionUiState.WithInterestsSelection(
|
|
|
|
topics = listOf(
|
|
|
|
topics = listOf(
|
|
|
|
FollowableTopic(
|
|
|
|
FollowableTopic(
|
|
|
|
topic = Topic(
|
|
|
|
topic = Topic(
|
|
|
@ -517,7 +517,7 @@ class ForYouViewModelTest {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
feedState = ForYouFeedState.Success(
|
|
|
|
feedState = ForYouFeedUiState.Success(
|
|
|
|
feed = emptyList(),
|
|
|
|
feed = emptyList(),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -526,7 +526,7 @@ class ForYouViewModelTest {
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
interestsSelectionState =
|
|
|
|
interestsSelectionState =
|
|
|
|
ForYouInterestsSelectionState.WithInterestsSelection(
|
|
|
|
ForYouInterestsSelectionUiState.WithInterestsSelection(
|
|
|
|
topics = listOf(
|
|
|
|
topics = listOf(
|
|
|
|
FollowableTopic(
|
|
|
|
FollowableTopic(
|
|
|
|
topic = Topic(
|
|
|
|
topic = Topic(
|
|
|
@ -598,14 +598,14 @@ class ForYouViewModelTest {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
feedState = ForYouFeedState.Loading
|
|
|
|
feedState = ForYouFeedUiState.Loading
|
|
|
|
),
|
|
|
|
),
|
|
|
|
awaitItem()
|
|
|
|
awaitItem()
|
|
|
|
)
|
|
|
|
)
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
interestsSelectionState =
|
|
|
|
interestsSelectionState =
|
|
|
|
ForYouInterestsSelectionState.WithInterestsSelection(
|
|
|
|
ForYouInterestsSelectionUiState.WithInterestsSelection(
|
|
|
|
topics = listOf(
|
|
|
|
topics = listOf(
|
|
|
|
FollowableTopic(
|
|
|
|
FollowableTopic(
|
|
|
|
topic = Topic(
|
|
|
|
topic = Topic(
|
|
|
@ -677,7 +677,7 @@ class ForYouViewModelTest {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
feedState = ForYouFeedState.Success(
|
|
|
|
feedState = ForYouFeedUiState.Success(
|
|
|
|
feed = listOf(
|
|
|
|
feed = listOf(
|
|
|
|
SaveableNewsResource(
|
|
|
|
SaveableNewsResource(
|
|
|
|
newsResource = sampleNewsResources[1],
|
|
|
|
newsResource = sampleNewsResources[1],
|
|
|
@ -714,7 +714,7 @@ class ForYouViewModelTest {
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
interestsSelectionState =
|
|
|
|
interestsSelectionState =
|
|
|
|
ForYouInterestsSelectionState.WithInterestsSelection(
|
|
|
|
ForYouInterestsSelectionUiState.WithInterestsSelection(
|
|
|
|
topics = listOf(
|
|
|
|
topics = listOf(
|
|
|
|
FollowableTopic(
|
|
|
|
FollowableTopic(
|
|
|
|
topic = Topic(
|
|
|
|
topic = Topic(
|
|
|
@ -786,7 +786,7 @@ class ForYouViewModelTest {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
feedState = ForYouFeedState.Success(
|
|
|
|
feedState = ForYouFeedUiState.Success(
|
|
|
|
feed = emptyList(),
|
|
|
|
feed = emptyList(),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -795,7 +795,7 @@ class ForYouViewModelTest {
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
interestsSelectionState =
|
|
|
|
interestsSelectionState =
|
|
|
|
ForYouInterestsSelectionState.WithInterestsSelection(
|
|
|
|
ForYouInterestsSelectionUiState.WithInterestsSelection(
|
|
|
|
topics = listOf(
|
|
|
|
topics = listOf(
|
|
|
|
FollowableTopic(
|
|
|
|
FollowableTopic(
|
|
|
|
topic = Topic(
|
|
|
|
topic = Topic(
|
|
|
@ -867,14 +867,14 @@ class ForYouViewModelTest {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
feedState = ForYouFeedState.Loading
|
|
|
|
feedState = ForYouFeedUiState.Loading
|
|
|
|
),
|
|
|
|
),
|
|
|
|
awaitItem()
|
|
|
|
awaitItem()
|
|
|
|
)
|
|
|
|
)
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
interestsSelectionState =
|
|
|
|
interestsSelectionState =
|
|
|
|
ForYouInterestsSelectionState.WithInterestsSelection(
|
|
|
|
ForYouInterestsSelectionUiState.WithInterestsSelection(
|
|
|
|
topics = listOf(
|
|
|
|
topics = listOf(
|
|
|
|
FollowableTopic(
|
|
|
|
FollowableTopic(
|
|
|
|
topic = Topic(
|
|
|
|
topic = Topic(
|
|
|
@ -946,7 +946,7 @@ class ForYouViewModelTest {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
feedState = ForYouFeedState.Success(
|
|
|
|
feedState = ForYouFeedUiState.Success(
|
|
|
|
feed = listOf(
|
|
|
|
feed = listOf(
|
|
|
|
SaveableNewsResource(
|
|
|
|
SaveableNewsResource(
|
|
|
|
newsResource = sampleNewsResources[1],
|
|
|
|
newsResource = sampleNewsResources[1],
|
|
|
@ -981,7 +981,7 @@ class ForYouViewModelTest {
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
interestsSelectionState =
|
|
|
|
interestsSelectionState =
|
|
|
|
ForYouInterestsSelectionState.WithInterestsSelection(
|
|
|
|
ForYouInterestsSelectionUiState.WithInterestsSelection(
|
|
|
|
topics = listOf(
|
|
|
|
topics = listOf(
|
|
|
|
FollowableTopic(
|
|
|
|
FollowableTopic(
|
|
|
|
topic = Topic(
|
|
|
|
topic = Topic(
|
|
|
@ -1053,7 +1053,7 @@ class ForYouViewModelTest {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
feedState = ForYouFeedState.Success(
|
|
|
|
feedState = ForYouFeedUiState.Success(
|
|
|
|
feed = emptyList()
|
|
|
|
feed = emptyList()
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -1079,7 +1079,7 @@ class ForYouViewModelTest {
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
interestsSelectionState =
|
|
|
|
interestsSelectionState =
|
|
|
|
ForYouInterestsSelectionState.WithInterestsSelection(
|
|
|
|
ForYouInterestsSelectionUiState.WithInterestsSelection(
|
|
|
|
topics = listOf(
|
|
|
|
topics = listOf(
|
|
|
|
FollowableTopic(
|
|
|
|
FollowableTopic(
|
|
|
|
topic = Topic(
|
|
|
|
topic = Topic(
|
|
|
@ -1151,7 +1151,7 @@ class ForYouViewModelTest {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
feedState = ForYouFeedState.Success(
|
|
|
|
feedState = ForYouFeedUiState.Success(
|
|
|
|
feed = emptyList()
|
|
|
|
feed = emptyList()
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -1181,8 +1181,8 @@ class ForYouViewModelTest {
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
interestsSelectionState =
|
|
|
|
interestsSelectionState =
|
|
|
|
ForYouInterestsSelectionState.NoInterestsSelection,
|
|
|
|
ForYouInterestsSelectionUiState.NoInterestsSelection,
|
|
|
|
feedState = ForYouFeedState.Success(
|
|
|
|
feedState = ForYouFeedUiState.Success(
|
|
|
|
feed = listOf(
|
|
|
|
feed = listOf(
|
|
|
|
SaveableNewsResource(
|
|
|
|
SaveableNewsResource(
|
|
|
|
newsResource = sampleNewsResources[1],
|
|
|
|
newsResource = sampleNewsResources[1],
|
|
|
@ -1223,8 +1223,8 @@ class ForYouViewModelTest {
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
interestsSelectionState =
|
|
|
|
interestsSelectionState =
|
|
|
|
ForYouInterestsSelectionState.NoInterestsSelection,
|
|
|
|
ForYouInterestsSelectionUiState.NoInterestsSelection,
|
|
|
|
feedState = ForYouFeedState.Success(
|
|
|
|
feedState = ForYouFeedUiState.Success(
|
|
|
|
feed = listOf(
|
|
|
|
feed = listOf(
|
|
|
|
SaveableNewsResource(
|
|
|
|
SaveableNewsResource(
|
|
|
|
newsResource = sampleNewsResources[0],
|
|
|
|
newsResource = sampleNewsResources[0],
|
|
|
@ -1262,8 +1262,8 @@ class ForYouViewModelTest {
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
interestsSelectionState =
|
|
|
|
interestsSelectionState =
|
|
|
|
ForYouInterestsSelectionState.NoInterestsSelection,
|
|
|
|
ForYouInterestsSelectionUiState.NoInterestsSelection,
|
|
|
|
feedState = ForYouFeedState.Success(
|
|
|
|
feedState = ForYouFeedUiState.Success(
|
|
|
|
feed = listOf(
|
|
|
|
feed = listOf(
|
|
|
|
SaveableNewsResource(
|
|
|
|
SaveableNewsResource(
|
|
|
|
newsResource = sampleNewsResources[1],
|
|
|
|
newsResource = sampleNewsResources[1],
|
|
|
@ -1305,7 +1305,7 @@ class ForYouViewModelTest {
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
interestsSelectionState =
|
|
|
|
interestsSelectionState =
|
|
|
|
ForYouInterestsSelectionState.WithInterestsSelection(
|
|
|
|
ForYouInterestsSelectionUiState.WithInterestsSelection(
|
|
|
|
topics = listOf(
|
|
|
|
topics = listOf(
|
|
|
|
FollowableTopic(
|
|
|
|
FollowableTopic(
|
|
|
|
topic = Topic(
|
|
|
|
topic = Topic(
|
|
|
@ -1377,7 +1377,7 @@ class ForYouViewModelTest {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
),
|
|
|
|
feedState = ForYouFeedState.Success(
|
|
|
|
feedState = ForYouFeedUiState.Success(
|
|
|
|
feed = emptyList()
|
|
|
|
feed = emptyList()
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -1409,7 +1409,7 @@ class ForYouViewModelTest {
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
interestsSelectionState =
|
|
|
|
interestsSelectionState =
|
|
|
|
ForYouInterestsSelectionState.WithInterestsSelection(
|
|
|
|
ForYouInterestsSelectionUiState.WithInterestsSelection(
|
|
|
|
topics = listOf(
|
|
|
|
topics = listOf(
|
|
|
|
FollowableTopic(
|
|
|
|
FollowableTopic(
|
|
|
|
topic = Topic(
|
|
|
|
topic = Topic(
|
|
|
@ -1481,7 +1481,7 @@ class ForYouViewModelTest {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
),
|
|
|
|
feedState = ForYouFeedState.Success(
|
|
|
|
feedState = ForYouFeedUiState.Success(
|
|
|
|
feed = emptyList()
|
|
|
|
feed = emptyList()
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -1506,8 +1506,8 @@ class ForYouViewModelTest {
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
ForYouUiState(
|
|
|
|
ForYouUiState(
|
|
|
|
interestsSelectionState =
|
|
|
|
interestsSelectionState =
|
|
|
|
ForYouInterestsSelectionState.NoInterestsSelection,
|
|
|
|
ForYouInterestsSelectionUiState.NoInterestsSelection,
|
|
|
|
feedState = ForYouFeedState.Success(
|
|
|
|
feedState = ForYouFeedUiState.Success(
|
|
|
|
feed = listOf(
|
|
|
|
feed = listOf(
|
|
|
|
SaveableNewsResource(
|
|
|
|
SaveableNewsResource(
|
|
|
|
newsResource = sampleNewsResources[1],
|
|
|
|
newsResource = sampleNewsResources[1],
|
|
|
|