fix(home): 팔로잉 크리에이터 전체 버튼을 고정한다
This commit is contained in:
+13
-14
@@ -316,29 +316,28 @@ class HomeFollowingFragmentSourceTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `팔로잉 크리에이터 목록은 전체 item을 마지막에 추가하고 이동을 연결한다`() {
|
||||
fun `팔로잉 크리에이터 전체 버튼은 목록 밖에 고정하고 이동을 연결한다`() {
|
||||
val layout = homeMainLayoutSource()
|
||||
val section = layout.substringAfter("@+id/ll_home_following_creators_section")
|
||||
.substringBefore("@+id/ll_home_following_on_air_section")
|
||||
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(section.contains("@+id/rv_home_following_creators"))
|
||||
assertTrue(section.contains("@+id/tv_home_following_creator_all"))
|
||||
assertTrue(adapter.contains("override fun getItemCount(): Int = items.size"))
|
||||
assertFalse(adapter.contains("VIEW_TYPE_ALL"))
|
||||
assertFalse(adapter.contains("AllViewHolder"))
|
||||
assertFalse(adapter.contains("item_home_following_creator_all"))
|
||||
assertTrue(projectFileOrNull("app/src/main/res/layout/item_home_following_creator_all.xml") == null)
|
||||
assertTrue(fragment.contains("import kr.co.vividnext.sodalive.following.FollowingCreatorActivity"))
|
||||
assertTrue(fragment.contains("HomeFollowingCreatorAdapter("))
|
||||
assertTrue(fragment.contains("onClickAll = { openFollowingCreatorAll() }"))
|
||||
assertTrue(fragment.contains("binding.tvHomeFollowingCreatorAll.setOnClickListener"))
|
||||
assertTrue(fragment.contains("openFollowingCreatorAll()"))
|
||||
assertTrue(fragment.contains("private fun openFollowingCreatorAll()"))
|
||||
assertTrue(fragment.contains("startActivity(Intent(requireContext(), FollowingCreatorActivity::class.java))"))
|
||||
assertTrue(allLayout.contains("@string/screen_home_theme_all"))
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user