Show live day updates and route date chip
This commit is contained in:
@@ -34,6 +34,23 @@ class DriverUiRulesTest {
|
||||
assertFalse(canCompleteRouteFromDriverApp(route(status = "ZAPLANOWANA"), "2026-06-29", today))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun showsLiveRouteDayUpdateOnlyForViewedDate() {
|
||||
assertTrue(shouldShowRouteDayLiveUpdate(viewedDate = "2026-03-12", hintDate = "2026-03-12"))
|
||||
assertTrue(shouldShowRouteDayLiveUpdate(viewedDate = "2026-03-12", hintDate = null))
|
||||
assertFalse(shouldShowRouteDayLiveUpdate(viewedDate = "2026-03-12", hintDate = "2026-03-13"))
|
||||
assertFalse(shouldShowRouteDayLiveUpdate(viewedDate = "", hintDate = "2026-03-12"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun formatsRouteDateChipHumanFirstWithShortFallback() {
|
||||
assertEquals("dzisiaj · 30.06", routeDateChipLabel("2026-06-30", today))
|
||||
assertEquals("jutro · 01.07", routeDateChipLabel("2026-07-01", today))
|
||||
assertEquals("w poniedziałek · 06.07", routeDateChipLabel("2026-07-06", today))
|
||||
assertEquals("02.03", routeDateChipLabel("2027-03-02", today))
|
||||
assertEquals("—", routeDateChipLabel("", today))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun calculatesPhotoGridRowsForTwoColumnInlineGallery() {
|
||||
assertEquals(0, inlinePhotoGridRows(0))
|
||||
|
||||
Reference in New Issue
Block a user