Kiosk: System Name entry in System Settings

Adds a System Name text-entry page (hint 'e.g. Living Room', 1-40 char
validation) and a data-driven System Settings row for it. Saving persists
locally and nudges the background sync; conflict/invalid results surface
the message and restore the previous name. Extends the settings-menu
tests.
This commit is contained in:
NeilClack
2026-09-29 09:58:08 -05:00
parent e7df02344b
commit 1bfe64580c
7 changed files with 287 additions and 7 deletions
+10 -7
View File
@@ -7,17 +7,19 @@ namespace settings = radiantwave::settings;
TEST(SystemSettingsMenuTest, ListsTheSystemSettingsInOrder) {
const auto entries = settings::systemSettingEntries();
ASSERT_EQ(entries.size(), 5u);
ASSERT_EQ(entries.size(), 6u);
EXPECT_EQ(entries[0].label, "Email Address");
EXPECT_EQ(entries[0].id, settings::SystemSettingId::EmailAddress);
EXPECT_EQ(entries[1].label, "License Key");
EXPECT_EQ(entries[1].id, settings::SystemSettingId::LicenseKey);
EXPECT_EQ(entries[2].label, "WiFi Setup");
EXPECT_EQ(entries[2].id, settings::SystemSettingId::WiFiSetup);
EXPECT_EQ(entries[3].label, "Time Zone Setup");
EXPECT_EQ(entries[3].id, settings::SystemSettingId::Timezone);
EXPECT_EQ(entries[4].label, "Date Format");
EXPECT_EQ(entries[4].id, settings::SystemSettingId::DateFormat);
EXPECT_EQ(entries[2].label, "System Name");
EXPECT_EQ(entries[2].id, settings::SystemSettingId::SystemName);
EXPECT_EQ(entries[3].label, "WiFi Setup");
EXPECT_EQ(entries[3].id, settings::SystemSettingId::WiFiSetup);
EXPECT_EQ(entries[4].label, "Time Zone Setup");
EXPECT_EQ(entries[4].id, settings::SystemSettingId::Timezone);
EXPECT_EQ(entries[5].label, "Date Format");
EXPECT_EQ(entries[5].id, settings::SystemSettingId::DateFormat);
}
TEST(SystemSettingsMenuTest, LabelsAreNonEmptyAndUnique) {
@@ -38,6 +40,7 @@ TEST(SystemSettingsMenuTest, EveryEntryMapsToAKnownPage) {
switch (entry.id) {
case settings::SystemSettingId::EmailAddress:
case settings::SystemSettingId::LicenseKey:
case settings::SystemSettingId::SystemName:
case settings::SystemSettingId::WiFiSetup:
case settings::SystemSettingId::Timezone:
case settings::SystemSettingId::DateFormat: