Release 0.2.49

This commit is contained in:
ponzischeme89
2026-08-11 13:46:53 +12:00
parent f46d6596c5
commit 594159c0ae
13 changed files with 325 additions and 59 deletions
@@ -1,9 +1,17 @@
package com.ponzischeme89.memby.ui
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNull
import org.junit.Test
class UserSwitcherNavigationTest {
@Test
fun `removed profile hands focus to its stable neighbour`() {
assertEquals(1, profileFocusIndexAfterRemoval(removedIndex = 1, remainingCount = 3))
assertEquals(2, profileFocusIndexAfterRemoval(removedIndex = 3, remainingCount = 3))
assertNull(profileFocusIndexAfterRemoval(removedIndex = 0, remainingCount = 0))
}
@Test
fun `active profile receives initial focus`() {
assertEquals(
@@ -0,0 +1,30 @@
package com.ponzischeme89.memby.ui.calendar
import org.junit.Assert.assertEquals
import org.junit.Test
class CalendarFocusTest {
@Test
fun `next month is the normal focus anchor`() {
assertEquals(
CalendarMonthFocusAnchor.NEXT,
calendarMonthFocusAnchor(previousMonth = "2026-07", nextMonth = "2026-09"),
)
}
@Test
fun `latest month anchors focus to previous month`() {
assertEquals(
CalendarMonthFocusAnchor.PREVIOUS,
calendarMonthFocusAnchor(previousMonth = "2026-12", nextMonth = ""),
)
}
@Test
fun `a calendar without travel controls uses ordinary focus search`() {
assertEquals(
CalendarMonthFocusAnchor.NONE,
calendarMonthFocusAnchor(previousMonth = "", nextMonth = ""),
)
}
}