package com.cottondb.daysimport androidx.activity.ComponentActivityimport androidx.compose.ui.test.junit4.createAndroidComposeRuleimport androidx.core.view.WindowCompatimport com.cottondb.shell.FaceBarsimport org.junit.Assert.assertFalseimport org.junit.Assert.assertTrueimport org.junit.Ruleimport org.junit.Testimport org.junit.runner.RunWithimport org.robolectric.RobolectricTestRunnerimport org.robolectric.annotation.Config/** * Days at night (the launch walk, 22 Nov 2026, emulator-5554, night mode): Days keeps its one light look, but the * status bar's clock, signal and battery were drawn white on its light grey sheet, hardly readable. Days' surface now * sets the bars by its own sheet: dark icons, day or night. */@RunWith(RobolectricTestRunner::class)@Config(sdk = [35], application = android.app.Application::class, qualifiers = "night")classDaysBarsTest { @get:Ruleval compose = createAndroidComposeRule<ComponentActivity>()privatefun bars() = compose.activity.window.let { WindowCompat.getInsetsController(it, it.decorView) }/** RULE: Days' light sheet takes dark icons. */ @Test fun the_sheet_takes_dark_icons() = assertFalse(barsDark()) @Test fun at_night_the_bars_stay_dark_on_the_sheet() { compose.setContent { androidx.compose.runtime.CompositionLocalProvider(com.cottondb.shell.LocalGround provides com.cottondb.shell.Ground.terrazzo) {FaceBars(dark = barsDark()) } } compose.waitForIdle() assertTrue("the clock went white on Days' light sheet at night", bars().isAppearanceLightStatusBars) }/** RULE: Days' surface sets the bars from its sheet. */ @Test fun the_surface_sets_the_bars() {val repo = generateSequence(java.io.File("").absoluteFile) { it.parentFile }.first { java.io.File(it, "apps/registry.json").isFile }val surface = java.io.File(repo, "apps/android/app/src/days/kotlin/com/cottondb/days/DaysSurface.kt").readText() assertTrue(surface.contains("FaceBars(dark = barsDark())")) }}