test(date-memories): add DATE_REFLECTION_PENDING priority engine tests
This commit is contained in:
parent
5375ba90a8
commit
47f311abda
|
|
@ -318,6 +318,44 @@ class HomePriorityEngineTest {
|
|||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `date reflection pending is a value action that surfaces as a secondary card`() {
|
||||
val input = Input(
|
||||
isPaired = true,
|
||||
dailyQuestionUnanswered = true,
|
||||
dateReflectionPending = true,
|
||||
suggestedPackAvailable = true,
|
||||
exploreGamesAvailable = true
|
||||
)
|
||||
|
||||
val output = HomePriorityEngine.compute(input)
|
||||
|
||||
// Daily question is the hero; the pending reflection rides along as a value-action card,
|
||||
// while the generic browse items (pack/explore) are filtered out of the secondary band.
|
||||
assertEquals(Priority.DAILY_QUESTION_UNANSWERED, output.primary?.priority)
|
||||
assertEquals(
|
||||
listOf(Priority.DATE_REFLECTION_PENDING),
|
||||
output.secondary.map { it.priority }
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `date reflection pending outranks the daily question closure card`() {
|
||||
val input = Input(
|
||||
isPaired = true,
|
||||
dateReflectionPending = true,
|
||||
dailyQuestionRevealed = true
|
||||
)
|
||||
|
||||
val output = HomePriorityEngine.compute(input)
|
||||
|
||||
assertEquals(Priority.DATE_REFLECTION_PENDING, output.primary?.priority)
|
||||
assertEquals(
|
||||
listOf(Priority.DAILY_QUESTION_REVEALED),
|
||||
output.secondary.map { it.priority }
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `primary priority convenience returns pairing needed for default empty input`() {
|
||||
assertEquals(Priority.PAIRING_NEEDED, HomePriorityEngine.primaryPriority(Input()))
|
||||
|
|
|
|||
Loading…
Reference in New Issue