feat(main): 홈 크리에이터 FAB를 추가한다

This commit is contained in:
2026-07-17 00:08:33 +09:00
parent 831533b4f6
commit 16aa946621
9 changed files with 686 additions and 4 deletions
@@ -0,0 +1,53 @@
package kr.co.vividnext.sodalive.v2.main
import kr.co.vividnext.sodalive.settings.notification.MemberRole
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Test
class MainHomeFabVisibilityPolicyTest {
@Test
fun `홈 탭 로그인 크리에이터이면 FAB를 표시한다`() {
val shouldShow = MainHomeFabVisibilityPolicy.shouldShow(
currentTab = MainV2Tab.HOME,
isLoginAllowed = true,
role = MemberRole.CREATOR.name
)
assertTrue(shouldShow)
}
@Test
fun `홈 탭이어도 로그인하지 않았으면 FAB를 숨긴다`() {
val shouldShow = MainHomeFabVisibilityPolicy.shouldShow(
currentTab = MainV2Tab.HOME,
isLoginAllowed = false,
role = MemberRole.CREATOR.name
)
assertFalse(shouldShow)
}
@Test
fun `홈 탭이어도 일반 유저이면 FAB를 숨긴다`() {
val shouldShow = MainHomeFabVisibilityPolicy.shouldShow(
currentTab = MainV2Tab.HOME,
isLoginAllowed = true,
role = MemberRole.USER.name
)
assertFalse(shouldShow)
}
@Test
fun `크리에이터여도 홈 탭이 아니면 FAB를 숨긴다`() {
val shouldShow = MainHomeFabVisibilityPolicy.shouldShow(
currentTab = MainV2Tab.CONTENT,
isLoginAllowed = true,
role = MemberRole.CREATOR.name
)
assertFalse(shouldShow)
}
}