Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@ import com.afternote.feature.home.presentation.R as HomeR
import com.afternote.feature.onboarding.presentation.R as OnboardingR
import com.afternote.feature.receiver.presentation.R as ReceiverR

/** 이 테스트의 관심 밖인 외부 라우팅을 채우는 no-op 묶음. */
private val noopActions =
ReceiverHomeActions(
onSettingClick = {},
onNavigateToMindRecord = {},
onNavigateToTimeLetter = {},
onNavigateToAfternote = {},
)

@HiltAndroidTest
@RunWith(AndroidJUnit4::class)
@OptIn(ExperimentalTestApi::class)
Expand Down Expand Up @@ -287,7 +296,7 @@ class ReceiverRuntimeCompletionAndroidTest {
ReceiverHomeScreen(
uiState = uiState,
onEvent = viewModel::onEvent,
actions = ReceiverHomeActions.Noop,
actions = noopActions,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@ package com.afternote.feature.receiver.presentation.home
* 데이터 로드/다운로드는 ViewModel이 관할하고, 외부 화면 이동만 호출 측이 채운다.
*/
data class ReceiverHomeActions(
val onSettingClick: () -> Unit = {},
val onNavigateToMindRecord: () -> Unit = {},
val onNavigateToTimeLetter: () -> Unit = {},
val onNavigateToAfternote: () -> Unit = {},
) {
companion object {
val Noop = ReceiverHomeActions()
}
}
val onSettingClick: () -> Unit,
val onNavigateToMindRecord: () -> Unit,
val onNavigateToTimeLetter: () -> Unit,
val onNavigateToAfternote: () -> Unit,
)
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ import com.afternote.feature.receiver.presentation.home.model.ReceiverHomeUiStat
import com.afternote.feature.receiver.presentation.home.model.SenderMessage
import com.android.tools.screenshot.PreviewTest

/** baseline 은 화면 픽셀만 본다 — 외부 라우팅은 눌리지 않으므로 빈 액션으로 채운다. */
private val noopActions =
ReceiverHomeActions(
onSettingClick = {},
onNavigateToMindRecord = {},
onNavigateToTimeLetter = {},
onNavigateToAfternote = {},
)

/**
* [ReceiverHomeScreen] 의 시각 회귀 baseline — Loading + Success + 부분 실패 세 케이스.
*
Expand All @@ -22,7 +31,7 @@ internal fun receiverHomeScreenLoadingScreenshot() {
ReceiverHomeScreen(
uiState = ReceiverHomeUiState.Loading,
onEvent = {},
actions = ReceiverHomeActions.Noop,
actions = noopActions,
)
}
}
Expand Down Expand Up @@ -54,7 +63,7 @@ internal fun receiverHomeScreenSuccessScreenshot() {
),
),
onEvent = {},
actions = ReceiverHomeActions.Noop,
actions = noopActions,
)
}
}
Expand All @@ -75,7 +84,7 @@ internal fun receiverHomeScreenPartialFailureScreenshot() {
afternoteIcons = emptyList(),
),
onEvent = {},
actions = ReceiverHomeActions.Noop,
actions = noopActions,
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config
import org.robolectric.annotation.GraphicsMode

/** 이 테스트의 관심 밖인 외부 라우팅을 채우는 no-op 묶음. */
private val noopActions =
ReceiverHomeActions(
onSettingClick = {},
onNavigateToMindRecord = {},
onNavigateToTimeLetter = {},
onNavigateToAfternote = {},
)

/**
* 수신자 홈 내려받기 실패 안내의 Snackbar 표출 가드 (#1391).
*
Expand Down Expand Up @@ -57,7 +66,7 @@ class ReceiverHomeDownloadSnackbarTest {
download = download,
),
onEvent = { },
actions = ReceiverHomeActions.Noop,
actions = noopActions,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config

/** 이 테스트의 관심 밖인 외부 라우팅을 채우는 no-op 묶음. */
private val noopActions =
ReceiverHomeActions(
onSettingClick = {},
onNavigateToMindRecord = {},
onNavigateToTimeLetter = {},
onNavigateToAfternote = {},
)

/**
* 수신자 홈 헤더가 수신자가 실제로 할 수 있는 액션만 두는지 (#613, 시안 4327:73626).
*
Expand All @@ -41,7 +50,7 @@ class ReceiverHomeHeaderTest {
ReceiverHomeScreen(
uiState = ReceiverHomeUiState.Loading,
onEvent = {},
actions = ReceiverHomeActions(),
actions = noopActions,
)
}
}
Expand All @@ -58,7 +67,7 @@ class ReceiverHomeHeaderTest {
ReceiverHomeScreen(
uiState = ReceiverHomeUiState.Loading,
onEvent = {},
actions = ReceiverHomeActions(onSettingClick = { settingClicks += 1 }),
actions = noopActions.copy(onSettingClick = { settingClicks += 1 }),
)
}
}
Expand Down
Loading