Skip to content

Commit

Permalink
fix: build error, button design
Browse files Browse the repository at this point in the history
  • Loading branch information
2018JunyoungLim committed Dec 3, 2023
1 parent ac8308e commit 051c24c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ fun EmojiPage(
contentColor = White
)
) {
Text("Sort by Date", fontSize = 12.sp)
Text(text = if (viewModel.sortingMode == 1) "Sort by Date" else "Sort by Save Count", fontSize = 12.sp)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class EmojiRepositoryImplTest {
emojiApi.fetchEmojiList(any(), any(), any())
} returns Response.success(sampleEmojiDtoList)
// when
val fetchedEmojiPagingDataFlow = runBlocking { emojiRepositoryImpl.fetchEmojiList() }
val fetchedEmojiPagingDataFlow = runBlocking { emojiRepositoryImpl.fetchEmojiList(1) }
val fetchedEmojiDtoList = runBlocking { fetchedEmojiPagingDataFlow.asSnapshot() }
// then
coVerify(exactly = 2) { emojiApi.fetchEmojiList(any(), any(), any()) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ class EmojiUseCaseImplTest {
val sampleEmojiPagingDataFlow = createDeterministicDummyEmojiDtoList(5)
val sampleAnswer = sampleEmojiPagingDataFlow.map { it.map { dto -> Emoji(dto) } }
coEvery {
emojiRepository.fetchEmojiList()
emojiRepository.fetchEmojiList(1)
} returns sampleEmojiPagingDataFlow
// when
val fetchedEmojiPagingDataFlow = runBlocking { emojiUseCaseImpl.fetchEmojiList() }
val fetchedEmojiPagingDataFlow = runBlocking { emojiUseCaseImpl.fetchEmojiList(1) }
// then
coVerify(exactly = 1) { emojiRepository.fetchEmojiList() }
coVerify(exactly = 1) { emojiRepository.fetchEmojiList(1) }
runBlocking {
val sampleAnswerAsSnapshot = sampleAnswer.asSnapshot()
val fetchedEmojiPagingDataFlowAsSnapshot = fetchedEmojiPagingDataFlow.asSnapshot()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class EmojiViewModelTest {
emojiUseCase.fetchEmojiList(1)
} returns sampleFetchedEmojiList
// when
emojiViewModel.fetchEmojiList(1)
emojiViewModel.fetchEmojiList()
advanceUntilIdle()
// then
coVerify(exactly = 1) { emojiUseCase.fetchEmojiList(1) }
Expand Down

0 comments on commit 051c24c

Please sign in to comment.