package com.cottondb.daysimport androidx.compose.ui.graphics.Colorimport androidx.compose.ui.text.font.FontFamilyimport androidx.compose.ui.unit.dpimport com.cottondb.days.pen.DaysCardLookimport com.cottondb.days.pen.Penimport com.cottondb.days.pen.PenPaletteimport com.cottondb.days.pen.PenTypeimport com.cottondb.days.ui.AsideRoomimport com.cottondb.days.ui.DateNameimport org.junit.Afterimport org.junit.Assert.assertEqualsimport org.junit.Assert.assertFalseimport org.junit.Assert.assertTrueimport org.junit.Test/** * RULE: the shell's pages over Days (Delete account, sign-in, the gate) stand on the paper and ink as they are now. The * card look is made once, on Grey; it kept Grey's light ground under Night's light ink, so Delete account read as * blank paper in a dark phone with Night chosen (the store-readiness walk, 26 Nov 2026). */classDaysCardLookColoursTest {privateval night = PenPalette.grey.copy(sheet = Color(0xFF15171F), ground = Color(0xFF101218), ink = Color(0xFFE6E8F0)) @After fun back() { Pen.palette = PenPalette.grey } @Test fun the_ground_and_ink_follow_the_paper_chosen_after_the_look_was_made() {val look = DaysCardLook(PenType(FontFamily.Monospace))Pen.palette = night assertEquals(night.sheet, look.ground) assertEquals(night.ink, look.ink) assertEquals(night.ink, look.danger) }}/** RULE: at the largest text a view's aside (Late's day) goes under the words rather than breaking them inside a word. */classDaysAsideUnderTest { @Test fun an_aside_that_fits_its_third_stays_beside() = assertFalse(AsideRoom.under(asideWidth = 250, wordsWidth = 900)) @Test fun an_aside_wider_than_its_third_goes_under() = assertTrue(AsideRoom.under(asideWidth = 330, wordsWidth = 900))}/** RULE: TalkBack says today's date once ("Today, Thursday 26 November. Jump to a day"), not twice. */classDaysDateNameTest {privatefun today(date: String) = "Today, $date" @Test fun today_is_said_once_before_its_date() = assertEquals("Today, Thursday 26 November", DateName.said("Thursday 26 November", today = true, todaySays = ::today)) @Test fun another_day_is_its_date() = assertEquals("Friday 27 November", DateName.said("Friday 27 November", today = false, todaySays = ::today))}/** RULE: on a tablet Days stands in a phone's measure; a phone is never narrowed. */classDaysWidthTest { @Test fun no_phone_is_narrowed() = assertTrue(DaysWidth.MOST >= 480.dp) @Test fun a_tablet_is_held_to_a_phones_measure() = assertTrue(DaysWidth.MOST <= 640.dp)}