package com.cottondb.notesimport android.app.Applicationimport androidx.compose.ui.test.assertTextEqualsimport androidx.compose.ui.test.junit4.createComposeRuleimport androidx.compose.ui.test.onNodeWithTagimport androidx.compose.ui.test.performClickimport androidx.compose.ui.test.performTextInputimport com.cottondb.shell.OwnWordsLineSheetimport kotlinx.serialization.json.Jsonimport kotlinx.serialization.json.jsonObjectimport org.junit.Assert.assertEqualsimport org.junit.Ruleimport org.junit.Testimport org.junit.runner.RunWithimport org.robolectric.RobolectricTestRunnerimport org.robolectric.annotation.Config/** * Settings → Privacy → Add a person did nothing in Words (seen on emulator-5600 against dev, 24 Nov 2026): the shell's * one-line ask was drawn only on the old fan surface. In Words' own sheet it stands with the core's title and hint, the * number typed goes to the commit, and a refusal is said under it. Invented number. */@RunWith(RobolectricTestRunner::class)@Config(sdk = [35], qualifiers = "w400dp-h800dp-mdpi", application = Application::class)classWordsAddPersonTest { @get:Ruleval compose = createComposeRule()privateval ask = Json.parseToJsonElement("""{"editor":"line","title":"Add a person","words":"","hint":"Their phone number, starting with +","keyboard":"phone","writes":{"kind":"people_add"}}""").jsonObject @Test fun the_number_typed_goes_to_the_commit() {var committed: String? = null compose.setContent {val c = androidx.compose.ui.platform.LocalContext.currentval (face, mono) = NotesLook.faces(c.assets)OwnWordsLineSheet(NotesCardLook(NotesLook.standing(c, false), face, mono), ask, said = "That number isn't on Cotton yet.", close = "Close", done = "Done", onClose = {}) { committed = it } } compose.onNodeWithTag("words-line-field").performTextInput("+15550190007 ") compose.onNodeWithTag("words-line-done").performClick() assertEquals("+15550190007", committed) compose.onNodeWithTag("words-line-said", useUnmergedTree = true).assertTextEquals("That number isn't on Cotton yet.") }}