Fix profile server selection activation state
This commit is contained in:
@@ -487,6 +487,7 @@ setInterval(() => {}, 60_000);
|
||||
selected.state.profiles.find(({ id }) => id === workProfileId).desiredServerId,
|
||||
testServerId,
|
||||
);
|
||||
assert.equal(selected.state.selection.desiredProfileId, workProfileId);
|
||||
assert.equal(selected.state.profiles.find(({ id }) => id === primaryProfileId).desiredServerId, testServerId);
|
||||
|
||||
const applied = await mutation('/api/apply', 'POST', {
|
||||
|
||||
@@ -179,6 +179,13 @@ test('rename and server selection are profile-scoped and reject stale or duplica
|
||||
await scoped.service.selectProfileServer('work', 'next', state.revision);
|
||||
assert.equal(scoped.snapshot().state.profiles.find(({ id }) => id === 'work').desiredServerId, 'next');
|
||||
assert.equal(scoped.snapshot().state.profiles.find(({ id }) => id === 'personal').desiredServerId, 'shared');
|
||||
assert.equal(scoped.snapshot().state.desiredProfileId, 'work');
|
||||
|
||||
const sameServer = scoped.snapshot().state;
|
||||
sameServer.desiredProfileId = 'personal';
|
||||
const reactivated = createHarness({ state: sameServer });
|
||||
await reactivated.service.selectProfileServer('work', 'next', sameServer.revision);
|
||||
assert.equal(reactivated.snapshot().state.desiredProfileId, 'work');
|
||||
});
|
||||
|
||||
test('refreshing an inactive profile does not mutate config, runtime, or the applied pair', async () => {
|
||||
|
||||
Reference in New Issue
Block a user