fix(home): 팔로잉 크리에이터 전체 이동을 연결한다

This commit is contained in:
2026-06-30 17:43:14 +09:00
parent 05cbbdfddc
commit 658b4f0a9d
4 changed files with 111 additions and 9 deletions

View File

@@ -199,6 +199,38 @@ class HomeFollowingFragmentSourceTest {
assertTrue(itemLayout.contains("@style/Typography.Body5"))
}
@Test
fun `following creators list appends all button as last item`() {
val adapter = projectFile(
"app/src/main/java/kr/co/vividnext/sodalive/v2/main/home/ui/HomeFollowingCreatorAdapter.kt"
).readText()
val fragment = homeMainFragmentSource()
val allLayoutFile = projectFileOrNull("app/src/main/res/layout/item_home_following_creator_all.xml")
assertTrue(allLayoutFile != null)
val allLayout = allLayoutFile?.readText().orEmpty()
assertTrue(adapter.contains("VIEW_TYPE_CREATOR"))
assertTrue(adapter.contains("VIEW_TYPE_ALL"))
assertTrue(adapter.contains("getItemViewType(position: Int)"))
assertTrue(adapter.contains("if (position < items.size) VIEW_TYPE_CREATOR else VIEW_TYPE_ALL"))
assertTrue(adapter.contains("override fun getItemCount(): Int = items.size + if (items.isNotEmpty()) 1 else 0"))
assertTrue(adapter.contains("R.layout.item_home_following_creator_all"))
assertTrue(adapter.contains("AllViewHolder"))
assertTrue(fragment.contains("import kr.co.vividnext.sodalive.following.FollowingCreatorActivity"))
assertTrue(fragment.contains("HomeFollowingCreatorAdapter("))
assertTrue(fragment.contains("onClickAll = { openFollowingCreatorAll() }"))
assertTrue(fragment.contains("private fun openFollowingCreatorAll()"))
assertTrue(fragment.contains("startActivity(Intent(requireContext(), FollowingCreatorActivity::class.java))"))
assertTrue(allLayout.contains("android:layout_width=\"wrap_content\""))
assertTrue(allLayout.contains("android:layout_height=\"wrap_content\""))
assertTrue(allLayout.contains("android:layout_height=\"75dp\""))
assertTrue(allLayout.contains("android:paddingHorizontal=\"16dp\""))
assertTrue(allLayout.contains("android:textColor=\"@color/soda_400\""))
assertTrue(allLayout.contains("android:visibility=\"invisible\""))
assertTrue(allLayout.contains("@string/screen_home_theme_all"))
}
@Test
fun `following recent chats section is horizontal box list`() {
val layout = homeMainLayoutSource()
@@ -246,4 +278,9 @@ class HomeFollowingFragmentSourceTest {
val candidates = listOf(File(relativePath), File("../$relativePath"))
return candidates.first { it.exists() }.canonicalFile
}
private fun projectFileOrNull(relativePath: String): File? {
val candidates = listOf(File(relativePath), File("../$relativePath"))
return candidates.firstOrNull { it.exists() }?.canonicalFile
}
}