fix(content): 전체 탭 grid 간격을 보정한다
This commit is contained in:
@@ -219,6 +219,21 @@ class ContentMainFragmentSourceTest {
|
||||
assertSourceContains(source, "binding.tvContentAllTotalCount.text")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `content grid item spacing은 span count 기반으로 열 간격을 계산한다`() {
|
||||
val source = projectFile(
|
||||
"app/src/main/java/kr/co/vividnext/sodalive/v2/main/content/ui/ContentRecyclerItemLayoutParams.kt"
|
||||
).readText()
|
||||
|
||||
assertSourceContains(source, "val columnIndex = position % spanCount")
|
||||
assertSourceContains(source, "outRect.left = (columnIndex * gap / spanCount).roundToInt()")
|
||||
assertSourceContains(source, "outRect.right = (gap - (columnIndex + 1) * gap / spanCount).roundToInt()")
|
||||
assertFalse(
|
||||
"3열 grid spacing은 left column 여부만으로 계산하면 인접 열 간격이 불균형해진다.",
|
||||
source.contains("isLeftColumn")
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `content 추천 source는 오디오와 시리즈 routing extra를 사용한다`() {
|
||||
val source = projectFile(
|
||||
|
||||
Reference in New Issue
Block a user