fix(settings): case sync tests follow lastPickedCase, a failed pick is not undone, rollback is covered

- sync-case-state browser and stale-refresh tests use lastPickedCase (the stale test now fails without its guard)
- saveLastUsedCase runs on the case-sync chain, and the follow is skipped while this device's own pick was not stored
- _caseStateSyncOn tolerates a harness without loadAppSettingsFromStorage
- lastPickedCase added to the config-backup volatile-key test and docs; rename rollback tests cover caseSettings and lastPickedCase
- wiki row moved to System
This commit is contained in:
Devvyn committed 2026-11-09 12:31:30 +08:00
1 parent 4808ee7085
commit bb088bcd3e
9 files changed
+104 -32

No files matched your search

-1
View File
@@ -1107,7 +1107,6 @@ describe('case selector refresh', () => {
{ name: 'kept-case', path: '/tmp/kept-case' },
];
app.showToast = vi.fn();
app.loadAppSettingsFromStorage = () => ({}); // saveLastUsedCase asks whether case sync is on
// deleteCase re-renders the case-manage list, whose path label goes through
// _shortenHomePath. That method lives in terminal-ui.js, which this harness