mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-17 03:39:33 +01:00
fix(settings): case sync asks and merges only while it is on
- session-ui.js: no GET /api/settings on a tab return unless this device's cached syncCaseState is true - system-routes.ts: caseSettings is merged only while syncCaseState is true (as stored or set by the same PUT) - sync-case-state tests cover both; wiki notes the stored options stay when sync is turned off
This commit is contained in:
1 parent
a50d0db283
commit
f8ff431d30
5 files changed
+24
-6
No files matched your search
@@ -188,11 +188,11 @@ describe('returning to the tab', () => {
|
||||
expect(app._caseStateSyncOn()).toBe(false);
|
||||
});
|
||||
|
||||
it('starts following when another device turned sync on', async () => {
|
||||
const { app, select, settings } = makeApp({}, () => env({ syncCaseState: true, lastUsedCase: 'beta' }));
|
||||
it('asks for nothing on a tab return while this device has sync off', async () => {
|
||||
const { app, select, calls } = makeApp({}, () => env({ syncCaseState: true, lastUsedCase: 'beta' }));
|
||||
await app._syncCaseStateFromServer();
|
||||
expect(settings.syncCaseState).toBe(true);
|
||||
expect(select.value).toBe('beta');
|
||||
expect(calls).toEqual([]);
|
||||
expect(select.value).toBe('alpha');
|
||||
});
|
||||
|
||||
it('does nothing for a read-only identity', async () => {
|
||||
|
||||
Reference in new issue
Block a user