Cotton code
31 lines · 1.6 KB · KotlinRaw
package com.cottondb.messagesimport android.app.Applicationimport androidx.compose.ui.test.junit4.createComposeRuleimport com.cottondb.report.ReportSheetCheckimport org.junit.Ruleimport org.junit.Testimport org.junit.runner.RunWithimport org.robolectric.RobolectricTestRunnerimport org.robolectric.annotation.Config/** * A shake in Comms opens "What looks wrong?" in Comms's own sheet (the warm Sheet, its outside named), asking only the question, the field * and Send, with the one line (OLD-LOOK item 2, 22 Nov 2026). Before, it was the shell's card: "Report a problem", a * picture of the screen, Cancel and Send, centred over a veil. */@RunWith(RobolectricTestRunner::class)@Config(sdk = [35], qualifiers = "w400dp-h800dp-mdpi", application = Application::class)class CommsReportSheetTest {    @get:Rule val compose = createComposeRule()    @Test fun it_asks_only_what_looks_wrong_in_comms_own_sheet() {        ReportSheetCheck.check(compose, look = { com.cottondb.messages.warm.WarmCardLook(com.cottondb.messages.warm.WarmColours.light, com.cottondb.messages.warm.WarmType.of(androidx.compose.ui.platform.LocalContext.current)) }, frame = "report-sheet-outside")    }    /** At the largest text with little room (the keyboard up), Send is in sight, never under the keyboard. */    @Config(qualifiers = "w400dp-h240dp-mdpi")    @Test fun send_stands_in_sight_at_the_largest_text() {        ReportSheetCheck.sendInSight(compose, look = { com.cottondb.messages.warm.WarmCardLook(com.cottondb.messages.warm.WarmColours.light, com.cottondb.messages.warm.WarmType.of(androidx.compose.ui.platform.LocalContext.current)) })    }}