package com.peachpasswords.ui.theme import androidx.compose.ui.graphics.Color import org.junit.Assert.assertEquals import org.junit.Assert.assertFalse import org.junit.Assert.assertNotEquals import org.junit.Assert.assertTrue import org.junit.Test /** * Light-theme regression lock (F brief). The light theme is wired through * [peachDark] / [peachLight] + [LocalPeachColors]; these pin the palette factories * so a future change can't silently reintroduce the dark-only singleton or turn * the warm parchment background into flat white. */ class PeachPaletteTest { @Test fun dark_palette_is_marked_dark() { assertTrue(peachDark().isDark) } @Test fun light_palette_is_marked_light() { assertFalse(peachLight().isDark) } @Test fun light_background_is_warm_parchment_not_white() { assertEquals(Color(0xFFEFEEE9), peachLight().Bg) assertNotEquals(Color.White, peachLight().Bg) } @Test fun dark_background_is_near_black() { assertEquals(Color(0xFF0C0A06), peachDark().Bg) } @Test fun text_inverts_between_themes() { // Dark T0 is light parchment text; light T0 is near-black ink. assertEquals(Color(0xFFF0E8D8), peachDark().T0) assertEquals(Color(0xFF1A1208), peachLight().T0) assertNotEquals(peachDark().T0, peachLight().T0) } @Test fun accent_is_carried_into_both_palettes() { val custom = Color(0xFF123456) assertEquals(custom, peachDark(custom).Accent) assertEquals(custom, peachLight(custom).Accent) } @Test fun default_accent_used_when_unspecified() { assertEquals(DEFAULT_ACCENT, peachDark().Accent) assertEquals(DEFAULT_ACCENT, peachLight().Accent) } @Test fun light_and_dark_surfaces_differ() { assertNotEquals(peachDark().S1, peachLight().S1) assertNotEquals(peachDark().SurfaceElevated, peachLight().SurfaceElevated) } }