| 1 | import { describe, expect, it } from "vite-plus/test"; |
| 2 | import { portableMobileUiSettings, mobileUiSettingsPatch } from "./uiSettingsSync"; |
| 3 | |
| 4 | describe("native UI profile portability", () => { |
| 5 | it("maps shared controls without publishing device defaults, native fonts, or integration state", () => { |
| 6 | expect(portableMobileUiSettings({})).toEqual({}); |
| 7 | expect( |
| 8 | portableMobileUiSettings({ |
| 9 | followUpBehavior: "steer", |
| 10 | projectGroupingMode: "repository_path", |
| 11 | workingShelfEnabled: true, |
| 12 | themeId: "material-you", |
| 13 | baseFontSize: 22, |
| 14 | terminalFontSize: 10.5, |
| 15 | microphones: [], |
| 16 | liveActivitiesEnabled: true, |
| 17 | }), |
| 18 | ).toEqual({ |
| 19 | followUpBehavior: "steer", |
| 20 | sidebarProjectGroupingMode: "repository_path", |
| 21 | sidebarWorkingShelfEnabled: true, |
| 22 | }); |
| 23 | }); |
| 24 | it("applies shared controls without changing native appearance or dropping desktop profile fields", () => { |
| 25 | expect( |
| 26 | mobileUiSettingsPatch({ |
| 27 | fontSizeCode: 18, |
| 28 | fontFamilySans: "Example", |
| 29 | wordWrap: true, |
| 30 | theme: { selection: "custom", mode: "dark", halves: {}, customThemes: [] }, |
| 31 | followUpBehavior: "queue", |
| 32 | sidebarProjectGroupingMode: "separate", |
| 33 | sidebarWorkingShelfEnabled: false, |
| 34 | }), |
| 35 | ).toEqual({ |
| 36 | followUpBehavior: "queue", |
| 37 | projectGroupingMode: "separate", |
| 38 | workingShelfEnabled: false, |
| 39 | }); |
| 40 | }); |
| 41 | }); |