gui: the keep guard sets ImageResolution, which only its own row sends

f6a538ece (v0.1.4490) added Settings > Images' Resolution. The server
keeps it when a save leaves it out, but TestSettingsSaveKeepsWhatItDoesNotSend
wants every field the Settings page doesn't send set in its fixture, and
was red: "ImageResolution: not sent by the Settings page". Found by the
post-ship full suite on mica at f6a538ece.

Run on mica: go test ./internal/gui -run
'TestSettingsSaveKeepsWhatItDoesNotSend|TestSettingsImageResolution'
ok. Broken by hand: dropping the keep in settingsapi.Merge turns it red
("ImageResolution:  after a save of the Settings page, was 4K").
This commit is contained in:
yetone
2026-11-19 02:02:53 +08:00
parent d01e0a465a
commit c4bae07248
+1
View File
@@ -238,6 +238,7 @@ func TestSettingsSaveKeepsWhatItDoesNotSend(t *testing.T) {
was.Wallpaper = 1700000000000 // Settings > General's Background image, appearance/wallpaper
was.HTTPS = true // Network and sharing's settings/https
was.OnTop = true // the title bar's pin, window/ontop
was.ImageResolution = "4K" // Settings > Images' Resolution row, sent by that row alone
was.Name = "Tokyo box" // Network and sharing's Advanced › Name, sent by its own row alone
// Settings > Usage's Bark row has its own route (settings/bark)
was.BarkServer, was.BarkKey, was.BarkDaily = "https://bark.example.com", "kept", "21:30"