Rename the Grown-ups profile and PIN to Adult (0.108.48)

A profile saved under the old name takes the new one when it loads.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-11-06 09:47:54 +00:00
co-authored by Claude Opus 5.5
parent 97ddf1979f
commit a43e808f7a
8 changed files with 26 additions and 20 deletions
@@ -90,7 +90,7 @@ class PhoneLinkTest {
PhoneLink.pinNeeded = { true }; PhoneLink.pinCheck = { it == "4321" }
val q = PhoneLink.beginPairing()
val asked = call("/join", "POST", "code=${q.code}", form = true).body
assertTrue(asked.contains("Grown-ups PIN")); assertTrue(asked.contains("isn't the code on the TV screen"))
assertTrue(asked.contains("Adult PIN")); assertTrue(asked.contains("isn't the code on the TV screen"))
assertTrue(call("/join", "POST", "code=${q.code}&pin=${q.code}", form = true).body.contains("not the TV's code"))
repeat(3) { call("/join", "POST", "code=${q.code}", form = true) } // asking again spends no tries
assertEquals(302, call("/join", "POST", "code=${q.code}&pin=4321", form = true).status)
@@ -10,7 +10,7 @@ class ProfilesTest {
@Test fun profilesSurviveBeingSavedAndRead() {
val changed = DefaultProfiles.map { if (it.kind == ProfileKind.Kids) it.copy(picture = "wand", channels = setOf(TOTS_NUMBER, 611), arcade = false, driveIn = true) else it }
assertEquals(changed, Profiles.decode(Profiles.encode(changed)))
// A saved list without Grown-ups is never used: Orbit goes back to the two it starts with.
// A saved list without Adult is never used: Orbit goes back to the two it starts with.
assertEquals(DefaultProfiles, Profiles.decode(Profiles.encode(changed.filter { it.kind == ProfileKind.Kids })))
}
@@ -31,4 +31,9 @@ class ProfilesTest {
assertEquals(18, ProfilePictures.size)
assertEquals("Fairy wand", pictureName("wand")); assertEquals("Pink", pictureName("sil-pink")); assertEquals("Ollie", pictureName("ollie"))
}
@Test fun aProfileSavedAsGrownUpsIsNowAdult() {
val saved = Profiles.encode(DefaultProfiles).replace("\"Adult\"", "\"Grown-ups\"")
assertEquals("Adult", Profiles.decode(saved).first { it.kind == ProfileKind.Grown }.name)
}
}